Forum Discussion

BobA's avatar
BobA
Icon for New Contributor rankNew Contributor
9 months ago
Solved

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

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.

11 Replies

  • sstrell's avatar
    sstrell
    Icon for Super Contributor rankSuper Contributor

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

    • BobA's avatar
      BobA
      Icon for New Contributor rankNew Contributor

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

  • BobA's avatar
    BobA
    Icon for New Contributor rankNew Contributor

    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.

    • sstrell's avatar
      sstrell
      Icon for Super Contributor rankSuper Contributor

      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.

      • BobA's avatar
        BobA
        Icon for New Contributor rankNew Contributor

        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.

  • Thank you sstrell for the answer.


    Hi OP,

    Does sstrell's suggestion helps?

    Do you have further inquiry regarding this case?


    Regards,

    Richard Tan


  • 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