what is system C.

is systemC capable of generating synthesizable hardware descriptions from a c code. if so, how does it compare with impulse C interms of features?

thanks

Reply to
manusha
Loading thread data ...

SystemC is a concurrent (parallel) language similar to languages like VHDL and Verilog whereas C is an untimed sequential language. SystemC doesn't "generate" synthesisable descriptions, for that you need a SystemC synthesis tool like Celoxica's Agility.

If you are thinking of using an FPGA I would suggest you also look at VHDL/Verilog which might be easier in terms of tools support, free IP cores and capabilities. I am not against C for hardware design (I think it's the way forward) but I don't believe it is mature enough unless you can afford tools like Mentors's Catapult or Forte's Cynthesiser :-)

Hans

formatting link

Reply to
Hans

Nah, the future's BerryHDL. ;-)

An example:

module UartTX(BITS = 8) { inport clk, rst, data[BITS - 1:0], wr, bitClock; outport tx, ready; reg sr[BITS + 4:0]; sr.clk = clk; tx = sr[0]; ready = 1 when sr == 1; sr = { all: 1 when rst; 1, 1, data[BITS - 1] ^ .. data[0], data[BITS - 1:0], 0, 1 when wr; 0, sr[BITS + 4:1] when bitClock & (sr != 1); } }

Reply to
Paul Taylor

What is BerryHDL ? I found nothing in google...

-daniel

Paul Taylor wrote:

Reply to
kunil

It's my pet project. I expect to release source code early next year.

formatting link

The line about the future being BerryHDL was very much tongue in cheek.

Reply to
Paul Taylor

Hi Paul,

I hope you are doing this as a research/PhD project and not trying to make a living out of it :-)

Hans

formatting link

Reply to
Hans

You liked it that much then :-)

No, it's not something I plan to make a living from. It's more or less a toy. Something I play with on dark British winter nights (on the nights when when I'm not entertaining my wife, which is much more fun).

As you liked the uart transmitter example so much, I have included the receiver below. It's basically three state machines/sequential blocks.

Regards,

Paul.

module UartRX(BITS = 8) { inport clk, rst, rx, bitClock16; outport data[BITS - 1:0], parityErr, framingErr, dataRdy; node rstRxDivider, rstRxReg, sample; reg sr[BITS + 2:0], sampleCount[3:0], sm[1:0]; sr.clk = sampleCount.clk = sm.clk = clk;

data = sr[BITS:1]; parityErr = sr[BITS + 1] ^ .. sr[1]; framingError = !sr[BITS + 2];

sr = { all: dataRdy = 1 when sr[0] == 0; all 1 when rst | rstRxReg; rx, sr[bits + 4:1] when sample; }

sampleCount = { all: 0 when rst | rstRxDivider; next when bitClock16; 7: sample = 1; }

sm = { all: 0 when rst; 0: rstRxDivider = 1 next when !rx with rstRxReg = 1; 1: 0 when rx & sample with rstRxDivider = 1; next when !rx & sample; 2: 0 when dataRdy; } }

Reply to
Paul Taylor

Hi Paul,

I also have to enjoy those British winter nights :-(

It looks like an interesting project which will certainly consume a lot of these nights :-)

Good luck with the project,

Hans

formatting link

Reply to
Hans

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.