Commit bb4f03fc authored by Denia Bouhired-Ferrag's avatar Denia Bouhired-Ferrag

Adds updated project with settings from tcl scrip also added. Top module…

Adds updated project with settings from tcl scrip also added. Top module modified to have correct LED output
parent 44d1350c
conv-common-gw @ 0026c3da
Subproject commit cba9c6a65dc59c0d2b16eac8ac9d9b8c707d536f
Subproject commit 0026c3da632437baef322fdb1bbca3898f375fc9
......@@ -89,10 +89,8 @@ architecture behav of testbench is
generic
(
g_pwidth : natural range 2 to 40 := 5;
-- Duty cycle divider: D = 1/g_duty_cycle_div
g_duty_cycle_div : natural := 18;
g_1_pulse_energ :in unsigned (15 downto 0);
g_max_temp_rise :in unsigned (39 downto 0)
g_1_pulse_temp_rise :in unsigned (15 downto 0);
g_max_temp :in unsigned (39 downto 0)
);
port
(
......@@ -169,11 +167,10 @@ architecture behav of testbench is
generic map
(
g_pwidth => 5,
g_duty_cycle_div => 100,
g_1_pulse_energ => x"2670",
--g_max_temp_rise => x"00000F4240" --10^6
g_1_pulse_temp_rise => x"1388",
--g_max_temp => x"00000F4240" --10^6
g_max_temp_rise => x"02540BE400" --10^10
g_max_temp => x"02540BE400" --10^10
)
port map(
clk_i => clk_20,
......@@ -205,7 +202,7 @@ architecture behav of testbench is
p_ran_gen : process
variable seed1, seed2: positive := 1; -- seed values for random generator
variable rand: real; -- random real-number value in range 0 to 1.0
variable range_of_rand : real := 10000.0; -- the range of random values created will be 0 to +1000.
variable range_of_rand : real := 1000.0; -- the range of random values created will be 0 to +10000.
begin
uniform(seed1, seed2, rand); -- generate random number
......@@ -243,13 +240,16 @@ end process p_ran_gen;
variable interval : time;-- := 1000 ns;
begin
--while t_sim1 < 5000000 ns loop
while true loop
while t_sim1 < 7000000 us loop
--while true loop
t_sim1 <= NOW - t_start;
if random_intervals then
interval := rand_num * 1 ns;
if interval < 250 ns then
interval := 250 ns;
end if;
else
interval := 250 ns;
interval := 500 ns;
end if;
burst_train <= '0';
wait for interval;
......@@ -258,29 +258,30 @@ end process p_ran_gen;
burst_train <= '0';
end loop;
-- while t_sim2 < 2000000 ns loop
-- t_sim2 <= NOW - t_sim1;
-- if random_intervals then
-- interval := rand_num * 1 ns;
-- else
-- interval := 5000 ns;
-- end if;
-- burst_train <= '0';
-- wait for interval;
-- burst_train <= '1';
-- wait for 250 ns;
-- burst_train <= '0';
-- end loop;
while t_sim2 < 800000 us loop
t_sim2 <= NOW - t_sim1;
if random_intervals then
interval := rand_num * 1 ns;
else
interval := 5000 ns;
end if;
burst_train <= '0';
wait for interval;
burst_train <= '1';
wait for 250 ns;
burst_train <= '0';
end loop;
end process p_stim_burst1;
-- p_write_output : process (temp_rise_counter)
-- file F : text open write_mode is "\\cern.ch\dfs\Users\d\debouhir\Documents\Projects\CONV-TTL-BlO\repo\conv-ttl-blo-gw\sim\Release\temp_rise_counter.txt";
-- file F : text open write_mode is "C:\Users\debouhir\work\CONV-TTL-BLO\conv-ttl-blo\conv-ttl-blo-gw\sim\Release\temp_rise_counter.txt";
-- variable L : line;
-- begin
-- write (L, NOW, left, 10);
-- write (L, temp_rise_counter, left, 6);
-- write (L, NOW, left, 30);
-- write (L, to_integer((temp_rise_counter (19 downto 0))), left, 50);
-- write (L, to_integer((temp_rise_counter (39 downto 20))), left, 50);
-- writeline (F, L);
-- end process p_write_output;
......
......@@ -21,7 +21,9 @@
<sourceproject xmlns="http://www.xilinx.com/XMLSchema" xil_pn:fileType="FILE_XISE" xil_pn:name="conv_ttl_blo.xise"/>
<files xmlns="http://www.xilinx.com/XMLSchema"/>
<files xmlns="http://www.xilinx.com/XMLSchema">
<file xil_pn:fileType="FILE_NCD" xil_pn:name="conv_ttl_blo_guide.ncd" xil_pn:origination="imported"/>
</files>
<transforms xmlns="http://www.xilinx.com/XMLSchema"/>
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -493,10 +493,10 @@ begin
-----------------------------------------
-- LED outputs
--led_front_n_o <= not led_pulse;
led_front_n_o <= "101010";
--led_front_inv_n_o <= not led_inv_pulse;
led_front_inv_n_o <= "1010";
led_front_n_o <= not led_pulse;
--led_front_n_o <= "101010";
led_front_inv_n_o <= not led_inv_pulse;
--led_front_inv_n_o <= "1010";
led_rear_n_o <= not led_pulse;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment