From c11fc57837acfd62de02d5fc28a83d7c3b4587a5 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 16 Jan 2009 10:39:25 +0000 Subject: Script to manufacture OPV word from 3 hex values. svn path=/trunk/libcss/; revision=6074 --- test/data/parse/makeopv.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 test/data/parse/makeopv.pl diff --git a/test/data/parse/makeopv.pl b/test/data/parse/makeopv.pl new file mode 100755 index 0000000..8961d48 --- /dev/null +++ b/test/data/parse/makeopv.pl @@ -0,0 +1,11 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +die "Usage: makeopv.pl \n" if (@ARGV != 3); + +my ($opcode, $flags, $value) = @ARGV; + +printf("0x%.8x\n", hex($opcode) | hex($flags) << 10 | hex($value) << 18); + -- cgit v1.2.3