Bit-Level C Simulator

K

Kingsley Oteng

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
 
L

Leon Heller

Kingsley said:
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
 
W

Wing Fong Wong

Leon Heller said:
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.
 
J

Jonathan Bromley

Kingsley Oteng said:
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: (e-mail address removed)
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.
 
T

Tuukka Toivonen

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top