Altera_Forum
Honored Contributor
15 years agoComponents in Verilog vs. VHDL
Hi,
here is an instance from a scfifo in verilog scfifo the_user_to_master_fifo ( .aclr (reset), .clock (clk), .data (user_buffer_data), .full (user_buffer_full), .empty (user_buffer_empty), .q (master_writedata), .rdreq (read_fifo), .wrreq (user_write_buffer) ); defparam the_user_to_master_fifo.lpm_width = DATAWIDTH; defparam the_user_to_master_fifo.lpm_numwords = FIFODEPTH; defparam the_user_to_master_fifo.lpm_showahead = "ON"; defparam the_user_to_master_fifo.use_eab = (fifousememory == 1)? "on" : "off"; defparam the_user_to_master_fifo.add_ram_output_register = "OFF"; defparam the_user_to_master_fifo.underflow_checking = "OFF"; defparam the_user_to_master_fifo.overflow_checking = "OFF"; and here in VHDL: scfifo_component : scfifo GENERIC MAP ( add_ram_output_register => "OFF", intended_device_family => "Cyclone III", lpm_numwords => fifo_depth, lpm_showahead => "ON", lpm_type => "scfifo", lpm_width => 8, lpm_widthu => fifo_depth_log2, overflow_checking => "ON", underflow_checking => "ON", use_eab => "on" ) PORT MAP ( clock => clock, sclr => sclr, wrreq => wrreq, aclr => aclr, data => data, rdreq => rdreq, usedw => sub_wire0, empty => sub_wire1, full => sub_wire2, q => sub_wire3 ); Now my question: Can i use conditional signal assignments for "actuals" in generic maps in VHDL likedefparam the_user_to_master_fifo.use_eab = (fifousememory == 1)? "on" : "off"; in Verilog ? I have tried use_eab => ("0n" when (fifo_use_memory = 1) else "off")
but this doesent work. Thanks, Nicolas