- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyboy,
I am not used with verilog (telling the truth I'm not used in design in general :P ) and I have a question... I don't understand why some register i shown on the right and only one on the left in this simple counter
module counter (data, count, rco, load, enable, reset, clock);
parameter WIDTH=4;
input data;
input load, enable, reset, clock;
output count;
output rco;
wire data;
wire rco, load, enable, reset, clock;
reg count;
assign rco = count == {WIDTH{1'b1}} ? 1'b1 : 1'b0;
always @ (posedge clock)
begin
if (!reset)
count <= 0;
else if (enable) begin
if (load) count <= data;
else count <= count + 1'b1;
end
end
endmodule
There is a screenshot of RTL viewer. img840.imageshack.us/img840/196/countera.jpg (sorry i cant post as image ... forumm need 5 post :( ) Is there a problem? Some options are wrong? I use Quartus 8.1 because i like the integreted simulator, from version 9 there isn't right? Thanks a lot in advance, Alessandro Vincenzi
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The block placement in RTL and gate level netlists is arbitrary and doesn't have a particular meaning. Everything looks correct in your design.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much, you were very clear.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
that's all because the damn synthesizer modifies your code and creates different circuit.new circuit will have same functionality. but it makes much harder to track down which variable became which element in RTL.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page