AlmostEmpty : out std_logic);
end component FIFO_36x128_OutReg;
+ component FIFO_36x64_OutReg is
+ port (
+ Data : in std_logic_vector(35 downto 0);
+ Clock : in std_logic;
+ WrEn : in std_logic;
+ RdEn : in std_logic;
+ Reset : in std_logic;
+ Q : out std_logic_vector(35 downto 0);
+ Empty : out std_logic;
+ Full : out std_logic;
+ AlmostEmpty : out std_logic);
+ end component;
+
+ component FIFO_36x32_OutReg is
+ port (
+ Data : in std_logic_vector(35 downto 0);
+ Clock : in std_logic;
+ WrEn : in std_logic;
+ RdEn : in std_logic;
+ Reset : in std_logic;
+ Q : out std_logic_vector(35 downto 0);
+ Empty : out std_logic;
+ Full : out std_logic;
+ AlmostEmpty : out std_logic);
+ end component;
+
+ component FIFO_36x16_OutReg is
+ port (
+ Data : in std_logic_vector(35 downto 0);
+ Clock : in std_logic;
+ WrEn : in std_logic;
+ RdEn : in std_logic;
+ Reset : in std_logic;
+ Q : out std_logic_vector(35 downto 0);
+ Empty : out std_logic;
+ Full : out std_logic;
+ AlmostEmpty : out std_logic);
+ end component;
+
component FIFO_DC_36x128_OutReg is
port (
Data : in std_logic_vector(35 downto 0);
Full : out std_logic);
end component FIFO_36x128_OutReg_Counter;
+ component FIFO_DC_36x32_OutReg is
+ port (
+ Data : in std_logic_vector(35 downto 0);
+ WrClock : in std_logic;
+ RdClock : in std_logic;
+ WrEn : in std_logic;
+ RdEn : in std_logic;
+ Reset : in std_logic;
+ RPReset : in std_logic;
+ Q : out std_logic_vector(35 downto 0);
+ Empty : out std_logic;
+ Full : out std_logic;
+ AlmostFull : out std_logic);
+ end component;
+
+ component FIFO_DC_36x16_OutReg is
+ port (
+ Data : in std_logic_vector(35 downto 0);
+ WrClock : in std_logic;
+ RdClock : in std_logic;
+ WrEn : in std_logic;
+ RdEn : in std_logic;
+ Reset : in std_logic;
+ RPReset : in std_logic;
+ Q : out std_logic_vector(35 downto 0);
+ Empty : out std_logic;
+ Full : out std_logic;
+ AlmostFull : out std_logic);
+ end component;
+
--component FIFO_24x2_OutReg
-- port (
-- Data : in std_logic_vector(23 downto 0);
#create full lpf file
-system("cp ../base/trb3_periph_ada.lpf workdir/$TOPNAME.lpf");
-system("cat currentRelease/trbnet_constraints.lpf >> workdir/$TOPNAME.lpf");
-system("cat currentRelease/tdc_constraints_4.lpf >> workdir/$TOPNAME.lpf");
-
+# system("cp ../base/trb3_periph_ada.lpf workdir/$TOPNAME.lpf");
+# system("cat currentRelease/trbnet_constraints.lpf >> workdir/$TOPNAME.lpf");
+# system("cat currentRelease/tdc_constraints_4.lpf >> workdir/$TOPNAME.lpf");
+system("cp ../base/trb3_periph_ada.lpf workdir/trb3_periph.lpf");
+system("cat currentRelease/trbnet_constraints.lpf >> workdir/trb3_periph.lpf");
+system("cat currentRelease/tdc_constraints_64.lpf >> workdir/trb3_periph.lpf");
+system("cat currentRelease/unimportant_lines_constraints.lpf >> workdir/trb3_periph.lpf");
+system("cat unimportant_lines_constraints.lpf >> workdir/trb3_periph.lpf");
#set -e
#set -o errexit
------------------------------------------------------------------------------
--TDC settings
- constant NUM_TDC_CHANNELS : integer range 1 to 65 := 33;
+ constant NUM_TDC_CHANNELS : integer range 1 to 65 := 2;
constant NUM_TDC_CHANNELS_POWER2 : integer range 0 to 6 := 5; --the nearest power of two, for convenience reasons
constant USE_DOUBLE_EDGE : integer := c_YES;
+--Define ringbuffer size for TDC channels: 32-64-128
+ constant RING_BUFFER_SIZE : integer range 32 to 128 := 64;
--use only every fourth input as in HPTDC high precision mode
constant USE_HPTDC_FASTMODE_PINOUT : integer := c_YES;
--number of real inputs to the FPGA
constant PHYSICAL_INPUTS : integer := 16;
---Define ringbuffer size for TDC channels: 32-64-128
- constant RING_BUFFER_SIZE : integer range 32 to 128 := 32;
-
--Run wih 125 MHz instead of 100 MHz
constant USE_125_MHZ : integer := c_NO; --not implemented yet!
#add_file options
add_file -vhdl -lib work "version.vhd"
-add_file -vhdl -lib work "currectRelease/tdc_version.vhd"
+add_file -vhdl -lib work "currentRelease/tdc_version.vhd"
add_file -vhdl -lib work "config.vhd"
add_file -vhdl -lib work "../../trbnet/trb_net_std.vhd"
add_file -vhdl -lib work "../../trbnet/trb_net_components.vhd"
add_file -vhdl -lib work "../../trbnet/lattice/ecp3/lattice_ecp3_fifo_18x16_dualport.vhd"
add_file -vhdl -lib work "../../trbnet/lattice/ecp3/spi_dpram_32_to_8.vhd"
-
+add_file -vhdl -lib work "../../trbnet/special/bus_register_handler.vhd"
add_file -vhdl -lib work "../../trbnet/special/spi_slim.vhd"
add_file -vhdl -lib work "../../trbnet/special/spi_master.vhd"
add_file -vhdl -lib work "../../trbnet/special/spi_databus_memory.vhd"
add_file -vhdl -lib "work" "currentRelease/risingEdgeDetect.vhd"
add_file -vhdl -lib "work" "currentRelease/hit_mux.vhd"
add_file -vhdl -lib "work" "../base/cores/FIFO_36x128_OutReg.vhd"
+add_file -vhdl -lib "work" "../base/cores/FIFO_36x64_OutReg.vhd"
+add_file -vhdl -lib "work" "../base/cores/FIFO_36x32_OutReg.vhd"
+add_file -vhdl -lib "work" "../base/cores/FIFO_36x16_OutReg.vhd"
add_file -vhdl -lib "work" "../base/cores/FIFO_DC_36x128_OutReg.vhd"
add_file -vhdl -lib "work" "../base/cores/FIFO_DC_36x64_OutReg.vhd"
+add_file -vhdl -lib "work" "../base/cores/FIFO_DC_36x32_OutReg.vhd"
+add_file -vhdl -lib "work" "../base/cores/FIFO_DC_36x16_OutReg.vhd"
#add_file -vhdl -lib "work" "currentRelease/Reference_Channel_200.vhd"
#add_file -vhdl -lib "work" "currentRelease/Reference_Channel.vhd"