Forum Discussion
Reduce inner counter dimension in modelsim
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
4 Replies
- sstrell
Super Contributor
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.
- ShengN_altera
Super Contributor
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
- RichardT_altera
Super Contributor
Does the suggestion provided help?
Do you need any further assistance?
Regards,
Richard Tan
- Raeiu
New Contributor
Based on the answers and after reflection I opted for a different type of test. Thank you