Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16971 Discussions

Reduce inner counter dimension in modelsim

Raeiu
Beginner
1,073 Views

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

 

 

Labels (1)
0 Kudos
4 Replies
sstrell
Honored Contributor III
1,049 Views

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.

0 Kudos
ShengN_Intel
Employee
1,023 Views

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


0 Kudos
RichardTanSY_Intel
938 Views

Does the suggestion provided help?

Do you need any further assistance? 


Regards,

Richard Tan


0 Kudos
Raeiu
Beginner
926 Views

Based on the answers and after reflection I opted for a different type of test. Thank you

0 Kudos
Reply