L
Lee
Guest
Dear all,
When I write verilog code, do I need to consider the hardware
structure?
For example,
one inverter can be writen in two ways:
1.if(a == 1)
output <= 0;
else
output <= 1;
2. assign output = ~a;
There is no any difference between them in behavior level.
In case 2, the synthesis tool can synthesize the code into an
inverter. What happens for case 1?Can the synthesis tool generate the
same circuit?
Above is just an example. In the digital design, some situations can
be more complicated. If I don't consider hardware structure much, I
can write the code in shorter time. If I consider hardware and
simplify it, I can write a short code in longer time and maybe the
better circuit.
Which one is better?Can I just depend on synthesis tools to get a good
design?
Thanks,
Adrian
When I write verilog code, do I need to consider the hardware
structure?
For example,
one inverter can be writen in two ways:
1.if(a == 1)
output <= 0;
else
output <= 1;
2. assign output = ~a;
There is no any difference between them in behavior level.
In case 2, the synthesis tool can synthesize the code into an
inverter. What happens for case 1?Can the synthesis tool generate the
same circuit?
Above is just an example. In the digital design, some situations can
be more complicated. If I don't consider hardware structure much, I
can write the code in shorter time. If I consider hardware and
simplify it, I can write a short code in longer time and maybe the
better circuit.
Which one is better?Can I just depend on synthesis tools to get a good
design?
Thanks,
Adrian