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

How to fix "Warning (10030): Net "microcode1.data_a" at MAX10CPU.sv(10) has no driver or initial val

BobA
Novice
1,988 Views

Hi,

 

I'm using Quartus Prime Lite 24.1 and Synplify Pro, targeting the MAX 10 10M08SCE144A7G. My SystemVerilog code is:

 

module MAX10CPU(
	input [15:0] address,
	output [7:0] mc,
	input noe
	);
	
	reg [7:0] microcode1 [0:65535];
	
	initial begin
		$readmemh("G:\\My Drive\\microcode1.mem", microcode1);
	end
	assign mc = (noe == 1) ? microcode1[address] : 8'bz;
endmodule

 

 I'm getting the warnings:

Warning (10030): Net "microcode1.data_a" at MAX10CPU.sv(9) has no driver or initial value, using a default initial value '0'
Warning (10030): Net "microcode1.waddr_a" at MAX10CPU.sv(9) has no driver or initial value, using a default initial value '0'
Warning (10030): Net "microcode1.we_a" at MAX10CPU.sv(9) has no driver or initial value, using a default initial value '0'

 

What's going on, and how can I fix it?

 

Thank you.

Labels (1)
0 Kudos
1 Solution
11 Replies
sstrell
Honored Contributor III
1,975 Views

EDIT: You have to use a .dat file to initialize memory in this way.

0 Kudos
BobA
Novice
1,973 Views

OK. So what's the proper way to initialize RAM from a file?

0 Kudos
BobA
Novice
1,904 Views

I figured it out ... in the IP Catalog expand On Chip Memory, select the type of memory to use, and in the wizard dialogs there's an option to initialize it to a file's contents.

 

0 Kudos
sstrell
Honored Contributor III
1,887 Views

Yes, that's another way to do it with the memory as an IP and a .hex or .mif file.  It seemed like you wanted to do it through code inference.

0 Kudos
BobA
Novice
1,886 Views

If there's another way to do this, I love to hear about it.

 

I didn't really understand your previous comment about using a .dat file. The .mem file I'm using is in the format accepted by $readmemh.

0 Kudos
sstrell
Honored Contributor III
1,879 Views

I've always used .dat for this.  I've never actually heard of .mem.  This article uses .txt actually: https://fpgacoding.com/test-bench-data-files-in-verilog/

0 Kudos
BobA
Novice
1,878 Views

It's just the extension. I know the file's contents are in $readmemh's format.

 

The bigger concern is that the 'initial' block doesn't get synthesized. But is there another way to initialize memory in the synthesized Verilog?

0 Kudos
sstrell
Honored Contributor III
1,878 Views
0 Kudos
RichardTanSY_Altera
1,625 Views

Thank you sstrell for the answer.


Hi OP,

Does sstrell's suggestion helps?

Do you have further inquiry regarding this case?


Regards,

Richard Tan


0 Kudos
BobA
Novice
1,621 Views

Yes, sstrell's suggestion helped.

0 Kudos
RichardTanSY_Altera
1,615 Views

I'm pleased to know that your question has been addressed. 


Now, I will transitioning this thread to community support. If you have any further questions or concerns, please don't hesitate to reach out. Please login to https://supporttickets.intel.com/s/?language=en_US , view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support.

The community users will be able to help you on your follow-up questions.


Thank you and have a great day!


Best Regards,

Richard Tan


0 Kudos
Reply