- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone. I need a way to reduce a inner 8bit counter of my device.
This counter counts to 255, i need to reduce it to 64 for simulation purposes.
N.B: cannot touch source code
Can someone help me? I have no idea how to do this
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If it's an internal counter in the design with no input controls that you can adjust through simulation and you can't edit the HDL, then you can't really do anything.
I guess in your testbench, you could write it to ignore output after it counts from 63 to 64, but there'd still be a period time where it's doing the rest of the count.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Probably can do like for example below in the testbench:
always @(posedge clk) begin
if (counter == 64) begin
$display(" ");
$finish;
end
end
Thanks,
Best Regards,
sheng
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does the suggestion provided help?
Do you need any further assistance?
Regards,
Richard Tan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Based on the answers and after reflection I opted for a different type of test. Thank you
![](/skins/images/4D2C80A4F3BA3A0D4303300CBEF817A4/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page