axi_logic_anlayzer: Fix trigger AND logic

AND logic means that all enabled triggers need to evaluate to true, others
are don't care. Fix the logic to behave accordingly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
main
Lars-Peter Clausen 2017-08-17 11:24:27 +02:00
parent 42ff5d4f80
commit f9fe66694d
1 changed files with 10 additions and 10 deletions

View File

@ -74,16 +74,16 @@ module axi_logic_analyzer_trigger (
always @(*) begin
case (trigger_logic)
0: trigger_active = | ((edge_detect & edge_detect_enable) |
(rise_edge & rise_edge_enable) |
(fall_edge & fall_edge_enable) |
(low_level & low_level_enable) |
(high_level & high_level_enable));
1: trigger_active = | (((edge_detect & edge_detect_enable) | !(|edge_detect_enable)) &
((rise_edge & rise_edge_enable) | !(|rise_edge_enable)) &
((fall_edge & fall_edge_enable) | !(|fall_edge_enable)) &
((low_level & low_level_enable) | !(|low_level_enable)) &
((high_level & high_level_enable) | !(|high_level_enable)));
0: trigger_active = |((edge_detect & edge_detect_enable) |
(rise_edge & rise_edge_enable) |
(fall_edge & fall_edge_enable) |
(low_level & low_level_enable) |
(high_level & high_level_enable));
1: trigger_active = &((edge_detect | ~edge_detect_enable) &
(rise_edge | ~rise_edge_enable) &
(fall_edge | ~fall_edge_enable) &
(low_level | ~low_level_enable) &
(high_level | ~high_level_enable));
default: trigger_active = 1'b1;
endcase
end