From e3dab991ea13b2be11931a0bc450f9e48ea2035d Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 19 May 2022 14:36:27 +0100 Subject: [PATCH 1/3] Core-676. Quartus V22.1 with Stratix 10 does not support read_during_write_mode_mixed_ports => READ_WRITE_MODE Changed to DONT_CARE. This should not affect operation, because there should never be read write collisions (by design). Version changed from 0 to 1 --- .../common/1/src/altera/alt_rw_dp_ram.vhd | 231 ++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 generic_ip/common/1/src/altera/alt_rw_dp_ram.vhd diff --git a/generic_ip/common/1/src/altera/alt_rw_dp_ram.vhd b/generic_ip/common/1/src/altera/alt_rw_dp_ram.vhd new file mode 100644 index 0000000..c7860c0 --- /dev/null +++ b/generic_ip/common/1/src/altera/alt_rw_dp_ram.vhd @@ -0,0 +1,231 @@ +-- megafunction wizard: %RAM: 2-PORT% +-- GENERATION: STANDARD +-- VERSION: WM1.0 +-- MODULE: altsyncram + +-- ============================================================ +-- File Name: generic_seq_ram.vhd +-- Megafunction Name(s): +-- altsyncram +-- +-- Simulation Library Files(s): +-- altera_mf +-- ============================================================ +-- ************************************************************ +-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE! +-- +-- 14.1.1 Build 190 01/19/2015 SJ Web Edition +-- ************************************************************ + + +--Copyright (C) 1991-2015 Altera Corporation. All rights reserved. +--Your use of Altera Corporation's design tools, logic functions +--and other software and tools, and its AMPP partner logic +--functions, and any output files from any of the foregoing +--(including device programming or simulation files), and any +--associated documentation or information are expressly subject +--to the terms and conditions of the Altera Program License +--Subscription Agreement, the Altera Quartus II License Agreement, +--the Altera MegaCore Function License Agreement, or other +--applicable license agreement, including, without limitation, +--that your use is for the sole purpose of programming logic +--devices manufactured by Altera and sold by Altera or its +--authorized distributors. Please refer to the applicable +--agreement for further details. + + +library ieee; +use ieee.std_logic_1164.all; + +library altera_mf; +use altera_mf.altera_mf_components.all; +use work.common_pkg.all; + +entity alt_rw_dp_ram is + generic ( + DATA_WIDTH : natural range 1 to 256 := 32; + DEPTH : natural range 2 to 131072 := 128; + REGISTER_OUTPUT : string := "CLOCK0"; -- "UNREGISTERED" + READ_WRITE_MODE : string := "OLD_DATA"; -- "DONT_CARE" + DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP" + ); + port + ( + addr_a : in std_logic_vector (log2(DEPTH)-1 downto 0); + addr_b : in std_logic_vector (log2(DEPTH)-1 downto 0); + clk : in std_logic := '1'; + wrdata_a : in std_logic_vector (DATA_WIDTH-1 downto 0); + wrdata_b : in std_logic_vector (DATA_WIDTH-1 downto 0); + wren_a : in std_logic := '0'; + wren_b : in std_logic := '0'; + rddata_a : out std_logic_vector (DATA_WIDTH-1 downto 0); + rddata_b : out std_logic_vector (DATA_WIDTH-1 downto 0) + ); +end alt_rw_dp_ram; + + +architecture syn of alt_rw_dp_ram is + + signal sub_wire0 : std_logic_vector (DATA_WIDTH-1 downto 0); + signal sub_wire1 : std_logic_vector (DATA_WIDTH-1 downto 0); + +begin + rddata_a <= sub_wire0(DATA_WIDTH-1 downto 0); + rddata_b <= sub_wire1(DATA_WIDTH-1 downto 0); + + altsyncram_component : altsyncram + generic map ( + address_reg_b => "CLOCK0", + clock_enable_input_a => "BYPASS", + clock_enable_input_b => "BYPASS", + clock_enable_output_a => "BYPASS", + clock_enable_output_b => "BYPASS", + indata_reg_b => "CLOCK0", + intended_device_family => DEVICE_FAMILY, + lpm_type => "altsyncram", + numwords_a => DEPTH, + numwords_b => DEPTH, + operation_mode => "BIDIR_DUAL_PORT", + outdata_aclr_a => "NONE", + outdata_aclr_b => "NONE", + outdata_reg_a => REGISTER_OUTPUT, + outdata_reg_b => REGISTER_OUTPUT, + power_up_uninitialized => "FALSE", + read_during_write_mode_mixed_ports => "DONT_CARE", + read_during_write_mode_port_a => "NEW_DATA_NO_NBE_READ", + read_during_write_mode_port_b => "NEW_DATA_NO_NBE_READ", + widthad_a => log2(DEPTH), + widthad_b => log2(DEPTH), + width_a => DATA_WIDTH, + width_b => DATA_WIDTH, + width_byteena_a => 1, + width_byteena_b => 1, + wrcontrol_wraddress_reg_b => "CLOCK0" + ) + port map ( + address_a => addr_a, + address_b => addr_b, + clock0 => clk, + data_a => wrdata_a, + data_b => wrdata_b, + wren_a => wren_a, + wren_b => wren_b, + q_a => sub_wire0, + q_b => sub_wire1 + ); + +end syn; + +-- ============================================================ +-- CNX file retrieval info +-- ============================================================ +-- Retrieval info: PRIVATE: ADDRESSSTALL_A NUMERIC "0" +-- Retrieval info: PRIVATE: ADDRESSSTALL_B NUMERIC "0" +-- Retrieval info: PRIVATE: BYTEENA_ACLR_A NUMERIC "0" +-- Retrieval info: PRIVATE: BYTEENA_ACLR_B NUMERIC "0" +-- Retrieval info: PRIVATE: BYTE_ENABLE_A NUMERIC "0" +-- Retrieval info: PRIVATE: BYTE_ENABLE_B NUMERIC "0" +-- Retrieval info: PRIVATE: BYTE_SIZE NUMERIC "8" +-- Retrieval info: PRIVATE: BlankMemory NUMERIC "1" +-- Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_A NUMERIC "0" +-- Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_B NUMERIC "0" +-- Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_A NUMERIC "0" +-- Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_B NUMERIC "0" +-- Retrieval info: PRIVATE: CLRdata NUMERIC "0" +-- Retrieval info: PRIVATE: CLRq NUMERIC "0" +-- Retrieval info: PRIVATE: CLRrdaddress NUMERIC "0" +-- Retrieval info: PRIVATE: CLRrren NUMERIC "0" +-- Retrieval info: PRIVATE: CLRwraddress NUMERIC "0" +-- Retrieval info: PRIVATE: CLRwren NUMERIC "0" +-- Retrieval info: PRIVATE: Clock NUMERIC "0" +-- Retrieval info: PRIVATE: Clock_A NUMERIC "0" +-- Retrieval info: PRIVATE: Clock_B NUMERIC "0" +-- Retrieval info: PRIVATE: IMPLEMENT_IN_LES NUMERIC "0" +-- Retrieval info: PRIVATE: INDATA_ACLR_B NUMERIC "0" +-- Retrieval info: PRIVATE: INDATA_REG_B NUMERIC "1" +-- Retrieval info: PRIVATE: INIT_FILE_LAYOUT STRING "PORT_A" +-- Retrieval info: PRIVATE: INIT_TO_SIM_X NUMERIC "0" +-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone V" +-- Retrieval info: PRIVATE: JTAG_ENABLED NUMERIC "0" +-- Retrieval info: PRIVATE: JTAG_ID STRING "NONE" +-- Retrieval info: PRIVATE: MAXIMUM_DEPTH NUMERIC "0" +-- Retrieval info: PRIVATE: MEMSIZE NUMERIC "8192" +-- Retrieval info: PRIVATE: MEM_IN_BITS NUMERIC "0" +-- Retrieval info: PRIVATE: MIFfilename STRING "" +-- Retrieval info: PRIVATE: OPERATION_MODE NUMERIC "3" +-- Retrieval info: PRIVATE: OUTDATA_ACLR_B NUMERIC "0" +-- Retrieval info: PRIVATE: OUTDATA_REG_B NUMERIC "0" +-- Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0" +-- Retrieval info: PRIVATE: READ_DURING_WRITE_MODE_MIXED_PORTS NUMERIC "2" +-- Retrieval info: PRIVATE: READ_DURING_WRITE_MODE_PORT_A NUMERIC "3" +-- Retrieval info: PRIVATE: READ_DURING_WRITE_MODE_PORT_B NUMERIC "3" +-- Retrieval info: PRIVATE: REGdata NUMERIC "1" +-- Retrieval info: PRIVATE: REGq NUMERIC "0" +-- Retrieval info: PRIVATE: REGrdaddress NUMERIC "0" +-- Retrieval info: PRIVATE: REGrren NUMERIC "0" +-- Retrieval info: PRIVATE: REGwraddress NUMERIC "1" +-- Retrieval info: PRIVATE: REGwren NUMERIC "1" +-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0" +-- Retrieval info: PRIVATE: USE_DIFF_CLKEN NUMERIC "0" +-- Retrieval info: PRIVATE: UseDPRAM NUMERIC "1" +-- Retrieval info: PRIVATE: VarWidth NUMERIC "0" +-- Retrieval info: PRIVATE: WIDTH_READ_A NUMERIC "32" +-- Retrieval info: PRIVATE: WIDTH_READ_B NUMERIC "32" +-- Retrieval info: PRIVATE: WIDTH_WRITE_A NUMERIC "32" +-- Retrieval info: PRIVATE: WIDTH_WRITE_B NUMERIC "32" +-- Retrieval info: PRIVATE: WRADDR_ACLR_B NUMERIC "0" +-- Retrieval info: PRIVATE: WRADDR_REG_B NUMERIC "1" +-- Retrieval info: PRIVATE: WRCTRL_ACLR_B NUMERIC "0" +-- Retrieval info: PRIVATE: enable NUMERIC "0" +-- Retrieval info: PRIVATE: rden NUMERIC "0" +-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all +-- Retrieval info: CONSTANT: ADDRESS_REG_B STRING "CLOCK0" +-- Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_A STRING "BYPASS" +-- Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_B STRING "BYPASS" +-- Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_A STRING "BYPASS" +-- Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_B STRING "BYPASS" +-- Retrieval info: CONSTANT: INDATA_REG_B STRING "CLOCK0" +-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone V" +-- Retrieval info: CONSTANT: LPM_TYPE STRING "altsyncram" +-- Retrieval info: CONSTANT: NUMWORDS_A NUMERIC "256" +-- Retrieval info: CONSTANT: NUMWORDS_B NUMERIC "256" +-- Retrieval info: CONSTANT: OPERATION_MODE STRING "BIDIR_DUAL_PORT" +-- Retrieval info: CONSTANT: OUTDATA_ACLR_A STRING "NONE" +-- Retrieval info: CONSTANT: OUTDATA_ACLR_B STRING "NONE" +-- Retrieval info: CONSTANT: OUTDATA_REG_A STRING "UNREGISTERED" +-- Retrieval info: CONSTANT: OUTDATA_REG_B STRING "UNREGISTERED" +-- Retrieval info: CONSTANT: POWER_UP_UNINITIALIZED STRING "FALSE" +-- Retrieval info: CONSTANT: READ_DURING_WRITE_MODE_MIXED_PORTS STRING "DONT_CARE" +-- Retrieval info: CONSTANT: READ_DURING_WRITE_MODE_PORT_A STRING "NEW_DATA_NO_NBE_READ" +-- Retrieval info: CONSTANT: READ_DURING_WRITE_MODE_PORT_B STRING "NEW_DATA_NO_NBE_READ" +-- Retrieval info: CONSTANT: WIDTHAD_A NUMERIC "8" +-- Retrieval info: CONSTANT: WIDTHAD_B NUMERIC "8" +-- Retrieval info: CONSTANT: WIDTH_A NUMERIC "32" +-- Retrieval info: CONSTANT: WIDTH_B NUMERIC "32" +-- Retrieval info: CONSTANT: WIDTH_BYTEENA_A NUMERIC "1" +-- Retrieval info: CONSTANT: WIDTH_BYTEENA_B NUMERIC "1" +-- Retrieval info: CONSTANT: WRCONTROL_WRADDRESS_REG_B STRING "CLOCK0" +-- Retrieval info: USED_PORT: address_a 0 0 8 0 INPUT NODEFVAL "address_a[7..0]" +-- Retrieval info: USED_PORT: address_b 0 0 8 0 INPUT NODEFVAL "address_b[7..0]" +-- Retrieval info: USED_PORT: clock 0 0 0 0 INPUT VCC "clock" +-- Retrieval info: USED_PORT: data_a 0 0 32 0 INPUT NODEFVAL "data_a[31..0]" +-- Retrieval info: USED_PORT: data_b 0 0 32 0 INPUT NODEFVAL "data_b[31..0]" +-- Retrieval info: USED_PORT: q_a 0 0 32 0 OUTPUT NODEFVAL "q_a[31..0]" +-- Retrieval info: USED_PORT: q_b 0 0 32 0 OUTPUT NODEFVAL "q_b[31..0]" +-- Retrieval info: USED_PORT: wren_a 0 0 0 0 INPUT GND "wren_a" +-- Retrieval info: USED_PORT: wren_b 0 0 0 0 INPUT GND "wren_b" +-- Retrieval info: CONNECT: @address_a 0 0 8 0 address_a 0 0 8 0 +-- Retrieval info: CONNECT: @address_b 0 0 8 0 address_b 0 0 8 0 +-- Retrieval info: CONNECT: @clock0 0 0 0 0 clock 0 0 0 0 +-- Retrieval info: CONNECT: @data_a 0 0 32 0 data_a 0 0 32 0 +-- Retrieval info: CONNECT: @data_b 0 0 32 0 data_b 0 0 32 0 +-- Retrieval info: CONNECT: @wren_a 0 0 0 0 wren_a 0 0 0 0 +-- Retrieval info: CONNECT: @wren_b 0 0 0 0 wren_b 0 0 0 0 +-- Retrieval info: CONNECT: q_a 0 0 32 0 @q_a 0 0 32 0 +-- Retrieval info: CONNECT: q_b 0 0 32 0 @q_b 0 0 32 0 +-- Retrieval info: GEN_FILE: TYPE_NORMAL generic_seq_ram.vhd TRUE +-- Retrieval info: GEN_FILE: TYPE_NORMAL generic_seq_ram.inc FALSE +-- Retrieval info: GEN_FILE: TYPE_NORMAL generic_seq_ram.cmp TRUE +-- Retrieval info: GEN_FILE: TYPE_NORMAL generic_seq_ram.bsf FALSE +-- Retrieval info: GEN_FILE: TYPE_NORMAL generic_seq_ram_inst.vhd FALSE +-- Retrieval info: LIB_FILE: altera_mf From 1eb101a6aee48a604f9a497816cccb8a38af8837 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 19 May 2022 14:54:12 +0100 Subject: [PATCH 2/3] Core-676. Correct syntax error when translate off is applied correctly. --- .../3/src/altera/altera_up_sync_fifo_3.v | 133 +++++++++--------- 1 file changed, 68 insertions(+), 65 deletions(-) diff --git a/generic_ip/uart_1MBd/3/src/altera/altera_up_sync_fifo_3.v b/generic_ip/uart_1MBd/3/src/altera/altera_up_sync_fifo_3.v index 07823da..da44f69 100644 --- a/generic_ip/uart_1MBd/3/src/altera/altera_up_sync_fifo_3.v +++ b/generic_ip/uart_1MBd/3/src/altera/altera_up_sync_fifo_3.v @@ -1,13 +1,13 @@ // (C) 2001-2016 Altera Corporation. All rights reserved. -// Your use of Altera Corporation's design tools, logic functions and other -// software and tools, and its AMPP partner logic functions, and any output -// files any of the foregoing (including device programming or simulation -// files), and any associated documentation or information are expressly subject -// to the terms and conditions of the Altera Program License Subscription -// Agreement, Altera MegaCore Function License Agreement, or other applicable -// license agreement, including, without limitation, that your use is for the -// sole purpose of programming logic devices manufactured by Altera and sold by -// Altera or its authorized distributors. Please refer to the applicable +// Your use of Altera Corporation's design tools, logic functions and other +// software and tools, and its AMPP partner logic functions, and any output +// files any of the foregoing (including device programming or simulation +// files), and any associated documentation or information are expressly subject +// to the terms and conditions of the Altera Program License Subscription +// Agreement, Altera MegaCore Function License Agreement, or other applicable +// license agreement, including, without limitation, that your use is for the +// sole purpose of programming logic devices manufactured by Altera and sold by +// Altera or its authorized distributors. Please refer to the applicable // agreement for further details. @@ -26,54 +26,54 @@ ******************************************************************************/ module altera_up_sync_fifo_3 ( - // Inputs - clk, - reset, + // Inputs + clk, + reset, - write_en, - write_data, + write_en, + write_data, - read_en, - - // Bidirectionals + read_en, - // Outputs - fifo_is_empty, - fifo_is_full, - words_used, + // Bidirectionals - read_data + // Outputs + fifo_is_empty, + fifo_is_full, + words_used, + + read_data ); /***************************************************************************** * Parameter Declarations * *****************************************************************************/ -parameter DW = 31; // Data width -parameter DATA_DEPTH = 128; -parameter AW = 6; // Address width +parameter DW = 31; // Data width +parameter DATA_DEPTH = 128; +parameter AW = 6; // Address width /***************************************************************************** * Port Declarations * *****************************************************************************/ // Inputs -input clk; -input reset; +input clk; +input reset; -input write_en; -input [DW: 0] write_data; +input write_en; +input [DW: 0] write_data; -input read_en; +input read_en; // Bidirectionals // Outputs -output fifo_is_empty; -output fifo_is_full; -output [AW: 0] words_used; +output fifo_is_empty; +output fifo_is_full; +output [AW: 0] words_used; -output [DW: 0] read_data; +output [DW: 0] read_data; /***************************************************************************** * Constant Declarations * @@ -109,44 +109,47 @@ output [DW: 0] read_data; *****************************************************************************/ -scfifo Sync_FIFO ( - // Inputs - .clock (clk), - .sclr (reset), +scfifo Sync_FIFO ( + // Inputs + .clock (clk), + .sclr (reset), - .data (write_data), - .wrreq (write_en), + .data (write_data), + .wrreq (write_en), - .rdreq (read_en), + .rdreq (read_en), - // Bidirectionals + // Bidirectionals - // Outputs - .empty (fifo_is_empty), - .full (fifo_is_full), - .usedw (words_used), - - .q (read_data), + // Outputs + .empty (fifo_is_empty), + .full (fifo_is_full), + .usedw (words_used), - // Unused - // synopsys translate_off - - .aclr (), - .almost_empty (), - .almost_full () - // synopsys translate_on + .q (read_data) + + // Unused + // synopsys translate_off + // Note comma below is taken from q line so when + // translate is off, syntax is correct + , + + .aclr (), + .almost_empty (), + .almost_full () + // synopsys translate_on ); defparam - Sync_FIFO.add_ram_output_register = "OFF", - Sync_FIFO.intended_device_family = "Cyclone II", - Sync_FIFO.lpm_numwords = DATA_DEPTH, - Sync_FIFO.lpm_showahead = "ON", - Sync_FIFO.lpm_type = "scfifo", - Sync_FIFO.lpm_width = DW + 1, - Sync_FIFO.lpm_widthu = AW + 1, - Sync_FIFO.overflow_checking = "OFF", - Sync_FIFO.underflow_checking = "OFF", - Sync_FIFO.use_eab = "ON"; + Sync_FIFO.add_ram_output_register = "OFF", + Sync_FIFO.intended_device_family = "Cyclone II", + Sync_FIFO.lpm_numwords = DATA_DEPTH, + Sync_FIFO.lpm_showahead = "ON", + Sync_FIFO.lpm_type = "scfifo", + Sync_FIFO.lpm_width = DW + 1, + Sync_FIFO.lpm_widthu = AW + 1, + Sync_FIFO.overflow_checking = "OFF", + Sync_FIFO.underflow_checking = "OFF", + Sync_FIFO.use_eab = "ON"; endmodule From 22251e1a71cf2b4dd1b342231fc6b922d06659d9 Mon Sep 17 00:00:00 2001 From: Dave Steele Date: Fri, 24 Jun 2022 09:19:57 +0100 Subject: [PATCH 3/3] DHBKM1800I-97. Expand allowed range on SHIFT_DEPTH. No functional change --- generic_ip/pixel_buffer/0/src/pixel_buffer_0.vhd | 4 ++-- generic_ip/preslicer/0/src/preslicer_0.vhd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generic_ip/pixel_buffer/0/src/pixel_buffer_0.vhd b/generic_ip/pixel_buffer/0/src/pixel_buffer_0.vhd index ccc30d4..8b06819 100644 --- a/generic_ip/pixel_buffer/0/src/pixel_buffer_0.vhd +++ b/generic_ip/pixel_buffer/0/src/pixel_buffer_0.vhd @@ -204,7 +204,7 @@ begin vp := to_unsigned(PX_DEPTH, 32); vpm1 := to_unsigned(PX_DEPTH-1, 32); - assert (vp and vpm1) = 0 report "PX_DEPTH must be a power of 2" severity failure; + assert (vp and vpm1) = 0 report "PX_DEPTH must be a power of 2" & integer'image(PX_DEPTH) severity failure; end process; -- pragma translate_on @@ -539,4 +539,4 @@ begin end if; end process; -end architecture; \ No newline at end of file +end architecture; diff --git a/generic_ip/preslicer/0/src/preslicer_0.vhd b/generic_ip/preslicer/0/src/preslicer_0.vhd index 1ddc00a..deee1d8 100644 --- a/generic_ip/preslicer/0/src/preslicer_0.vhd +++ b/generic_ip/preslicer/0/src/preslicer_0.vhd @@ -51,7 +51,7 @@ entity preslicer_0 is generic( NUM_STRIPES_DEPTH : integer range 2 to 32 := 8; -- whole 1bpp equivalent stripes must it be possible to buffer in preslicer NUM_STRIPES_FULL_MARGIN : integer range 1 to 31 := 2; -- at least this many 1bpp equivalent stripes space must be available - SHIFT_DEPTH : integer range 1 to 2048 := 128; -- head shift buffer depth + SHIFT_DEPTH : integer range 1 to 4096 := 128; -- head shift buffer depth MAX_OP_WIDTH : natural range 1 to 128 := 8; DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP" ); @@ -233,4 +233,4 @@ begin end if; end process; -end rtl; \ No newline at end of file +end rtl;