1. System function block
Read in the local file, the last two can default
$readmemb ("<Data file name>",<Repository name>,<Start address>,<End address>)
$readmemh ("<DataFileName>",<RepositoryName>,<StartAddress>,<EndAddress>)
reg [379:0] CAL2_sample[0:2999];
initial $readmemb ( "./../matlab/ideal_high_freq_sample_bits.txt", CAL2_sample,0,2999 );
tdc_finecode_i <= CAL2_sample[samlpe_cnt];
Save the print results to the document
// finetime_o finetime_valid_o output:dut
integer fid;
initial
fid = $fopen("fintimeout_ideal1.txt","w");
integer finetime_cnt=0;
always@(posedge main_pll_clk_80m_i or negedge rst_n) begin
if(!rst_n) begin
finetime_cnt <= 'd0;
end
else if(finetime_cnt==2999)
$fclose(fid);
else if(finetime_valid_buf==2'b01) begin
finetime_cnt <= finetime_cnt + 1'b1;
$fwrite(fid,"%d\n",finetime_o);
$display("%d",finetime_o);
end
finetime_valid_buf <= {finetime_valid_buf[0],finetime_valid_o};
end
Read More:
- ORA-01144: File size (39321600 blocks) exceeds maximum of 4194303 blocks
- Syntax error near in Verilog?
- When using quartus for function simulation, “testbench” appears_ vector_ input_ The solution of “file option does not exist”
- Configuring OpenGL in Code:: blocks
- Using cbmakegen to export makefile of code:: blocks
- Error: php56w-common conflicts with php-common-5.3.3-48.el6_ 8.x86_ 64
- Configuring OpenGL environment with code blocks16.0 in Windows 10
- Code:: blocks prompt nullptr’s was not declared in this scope
- Code blocks debugger debugger setup problem
- Code::Blocks 12.11 error: ‘nullptr’ was not declared in this scope&GNU GCC -std=gnu++0x
- Several common methods of inserting pictures into latex documents
- Common attributes and methods of list and map in Dar
- One of the common mistakes of tex
- R-common errors and their possible causes — Notes
- Common command of docker
- Common problems and basic concept knowledge of OpenGL
- 1143 Lowest Common Ancestor
- Linux common problems and Solutions
- Common problems of Hadoop startup error reporting
- Common problems and solutions under Linux