Bit-Level C Simulator

K

Kingsley Oteng

Guest
Hello,

I was hoping to bit-level verify a communications simulator that I have
built and was thus hoping to modify my C code to do this (i.e. finitely
constrain my variables).

Is there a freely available bit-level accurate C compiler out there? Someone
mentioned "vi" a while back but I have been unable to find a link for
this...

- Kingsley
 
Kingsley Oteng wrote:

Hello,

I was hoping to bit-level verify a communications simulator that I have
built and was thus hoping to modify my C code to do this (i.e. finitely
constrain my variables).

Is there a freely available bit-level accurate C compiler out there? Someone
mentioned "vi" a while back but I have been unable to find a link for
this...
Isn't vi the unix text editor?

Leon
--
Leon Heller, G1HSM
Email: aqzf13@dsl.pipex.com
My low-cost Philips LPC210x ARM development system:
http://www.geocities.com/leon_heller/lpc2104.html
 
Leon Heller <aqzf13@dsl.pipex.com> wrote:
Isn't vi the unix text editor?

Leon
There is a windoze version out there too. but you are right
it is usually the standard text editor in unix.

Wing Wong.
--
Webpage: http://wing.ucc.asn.au
 
"Kingsley Oteng" <k.oteng@student.unsw.edu.au> wrote in
message news:buacc8$la7$1@tomahawk.unsw.edu.au...
Hello,

I was hoping to bit-level verify a communications simulator that I have
built and was thus hoping to modify my C code to do this (i.e. finitely
constrain my variables).

Is there a freely available bit-level accurate C compiler out there?
Take a look at the SystemC reference simulator (www.systemc.org).
It's probably way more than you want, but it includes a fine
fixed-point C++ class library, and various other stuff that
may help.
--

Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * Perl * Tcl/Tk * Verification * Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail: jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
In article <buacc8$la7$1@tomahawk.unsw.edu.au>, Kingsley Oteng wrote:
Is there a freely available bit-level accurate C compiler out there? Someone
mentioned "vi" a while back but I have been unable to find a link for
this...
Maybe that was a joke: you don't need any special compiler, C compilers
_are_ bit-level accurate in the sense that you can create a hardware
simulation model using C perfectly well. You need just a text editor...

If you are modeling just combinational logic, it'll be very efficient
and quite easy too. Just use something like

typedef unsigned char bit_t;

bit_t my_nor(bit_t in1, bit_t in2) {
bit_t x;
x = in1 | in2;
x = ~x;
return x;
}

I did something like this and it was 10-100 times faster than equivalent
VHDL code with QuickHDL (but with different computer).
 

Welcome to EDABoard.com

Sponsor

Back
Top