Sunday 17 September 2017

$random in Verilog doesn't seem to be working


In Verilog, $random generates different random inputs but this doesn't seem to be working when I try. Each time I use $random for a reg or integer, I must be getting different different values but that is not so. I tried it even in Modelsim simulator.


http://www.edaplayground.com/x/Umt


`timescale 1ns/1ns
module tt;
integer kk;


initial
begin
repeat(5) begin
kk=$random % 10;
end
$monitor("%d",kk);
end
endmodule


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...