Altera_Forum
Honored Contributor
10 years agoID 12006 Undefined entity
Hi just a quick run down of what im trying to achieve write a value to my verilog code and read back the double value (input*2) gonna expand later on...(im new to FPGA)
ive greated a Qsys module as described here: ftp://ftp.altera.com/up/pub/altera_material/12.0/tutorials/making_qsys_components.pdf the plan is the write/read a value from NIOS (hello_world) template to the new component(modified to return 2* input value, and removed the HEX output). 1.) Qsys module created (ok) 2.) Qsys generate HDL (ok) 3.) Nios project (debug via JTAG) (ok) -c code function returns same value as writtenvoid MyReadWrite(void)
{
static int writeval = 22;
int readval = 0;
IOWR(REG16_AVALON_INTERFACE_0_BASE,0,writeval);
readval = IORD(REG16_AVALON_INTERFACE_0_BASE,0);
printf("\n Reg16 Test WriteVal: %d, ReadBackVal: %d",writeval,readval);
writeval++;
}
reply in NIOS concole: Reg16 Test WriteVal: 22, ReadBackVal: 22 (i think i just write/read to memory somewhere without entering the verilog code. i havent compiled the FPGA code(Quartus project to get a .sof file) yet, at least i dont think so not 100% sure of whats include when i launch a debug session from eclipse) 4.) created a Quartus project (ok) containing the following files: -nios_setup.qip -MyReg16_avalon_interface.v -MyReg.v -top.v -platform/alt_pll/alt_pll.qip top.sdc 5.) when i try to compile the project i get the following error " Id 12006 instance "comb_4" instantiates undefined entity "nios_setup" (Guess i need to add something to my top.v file just dont know how/what t o add.) my top.v is a from the ADC demo in the design store. module top (
input clk,
input reset,
input SW,
output LED
);
wire adc_10M_clk;
wire nios_50M_clk;
wire pll_locked;
wire reset_n;
assign reset_n = !reset;
all_pll alt_pll_inst (
.areset ( reset ),
.inclk0 ( clk ),
.c0 ( adc_10M_clk ),
.c1 ( nios_50M_clk),
.locked ( pll_locked )
);
nios_setup (
.clk_clk (nios_50M_clk), // clk.clk
.reset_reset_n (reset_n), // reset.reset_n
.led_io_external_connection_export (LED), // led_pio_external_connection.export
.sw_io_external_connection_export (SW), // switch_pio_external_connection.export
.modular_adc_0_adc_pll_clock_clk (adc_10M_clk), // modular_adc_0_adc_pll_clock.clk
.modular_adc_0_adc_pll_locked_export (pll_locked) // modular_adc_0_adc_pll_locked.export
);
endmodule
any explanation on how to make this work would be appreciated. thanks in advance