ip: nuand: Improve time_tamer|compare_time timing closure

The compare_time <= timestamp comparison is problematic for timing
closure in some designs because it takes much longer than a simple
equivalency check. The less than portion is (probably) not needed.
This commit is contained in:
Brian Glod 2017-04-26 11:51:55 -04:00 • committed by Robert Ghilduta
commit b98350bb3e
3 changed files with 21 additions and 3 deletions

View file

@ -1,6 +1,24 @@
# Create work library
vlib nuand
# Compile design files
vcom -work nuand -2008 ../../synthesis/synchronizer.vhd
vcom -work nuand -2008 ../../synthesis/handshake.vhd
vcom -work nuand -2008 ../vhdl/time_tamer.vhd
vcom -work nuand -2008 ../vhdl/tb/time_tamer_tb.vhd
# Elaborate design
vsim nuand.time_tamer_tb
# Add waves
add wave -hexadecimal sim:/time_tamer_tb/U_tamer/clock
add wave -hexadecimal sim:/time_tamer_tb/U_tamer/reset
add wave -hexadecimal sim:/time_tamer_tb/U_tamer/ts_clock
add wave -hexadecimal sim:/time_tamer_tb/U_tamer/ts_reset
add wave -hexadecimal sim:/time_tamer_tb/U_tamer/timestamp
add wave -hexadecimal sim:/time_tamer_tb/U_tamer/compare_time
add wave -hexadecimal sim:/time_tamer_tb/U_tamer/check_compare/fsm
# Run
run -all

View file

@ -10,7 +10,7 @@ architecture arch of time_tamer_tb is
signal clock : std_logic := '1' ;
signal reset : std_logic := '1' ;
signal addr : std_logic_vector(4 downto 0) ;
signal addr : std_logic_vector(4 downto 0) := (others => '0');
signal din : std_logic_vector(7 downto 0) ;
signal dout : std_logic_vector(7 downto 0) ;
signal write : std_logic := '0' ;

View file

@ -51,7 +51,7 @@ architecture arch of time_tamer is
signal timestamp : unsigned(63 downto 0) ;
signal compare_time : unsigned(63 downto 0) ;
signal compare_time : unsigned(63 downto 0) := (others => '0');
signal mm_clear_compare : std_logic ;
signal mm_compare_cleared : std_logic ;
@ -304,7 +304,7 @@ begin
end if ;
when WAIT_FOR_COMPARE =>
if( compare_time <= timestamp ) then
if( compare_time = timestamp ) then
ts_time_trigger <= '1' ;
ts_compare_loaded <= '0' ;
fsm := WAIT_FOR_CLEAR ;