- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am writing something in verilog in quartus, and appeared to me something strange, but pretty simple actually
This code increments the address correctly module counter( input wire clock, input wire reset, output reg [4:0]address);initialbegin address = 5'b0endalways@(posedge clock)begin if(reset) begin address <= 5'b0; end else begin address <= address + 5'b00001; endendendmodulethis, the bits that change become not matter, it happens when I start the output to something other than 0 module counter( input wire clock, input wire reset, output reg [4:0]address);initialbegin address = 5'b11101;endalways@(posedge clock)begin if(reset) begin address <= 5'b0; end else begin address <= address + 5'b00001; endendendmoduleDoes anyone know any way to solve this problem?Link Copied
0 Replies
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