Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: azonenberg/starshipraider
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8972afe441e1
Choose a base ref
...
head repository: azonenberg/starshipraider
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1689c8310231
Choose a head ref
  • 1 commit
  • 5 files changed
  • 1 contributor

Commits on Jul 19, 2020

  1. Copy the full SHA
    1689c83 View commit details
Original file line number Diff line number Diff line change
@@ -220,10 +220,14 @@ module TriggerSystem_sim();
assign pconfig.clock_match_falling = 0;
assign pconfig.reset_match_rising = 0;
assign pconfig.reset_match_falling = 1;
assign pconfig.targets[0] = 32'h03;
assign pconfig.targets[1] = 32'h12;
assign pconfig.targets[2] = 32'h34;
assign pconfig.targets[3] = 32'h56;
assign pconfig.target_values[0] = 32'h03;
assign pconfig.target_values[1] = 32'h12;
assign pconfig.target_values[2] = 32'h34;
assign pconfig.target_values[3] = 32'h56;
assign pconfig.target_masks[0] = 32'hff;
assign pconfig.target_masks[1] = 32'hff;
assign pconfig.target_masks[2] = 32'hff;
assign pconfig.target_masks[3] = 32'hff;

lssample_t[3:0] match_found;

Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
/**
@file
@author Andrew D. Zonenberg
@brief Compares two inputs together.
@brief Compares two inputs together, applying a bitmask to the first.
At most one match per CLK cycle will be reported.
*/
@@ -43,8 +43,9 @@ module DigitalComparator #(
) (
input wire clk,

input lssample_t din_valid,
input wire lssample_t din_valid,
input wire[WIDTH-1:0] din_a,
input wire[WIDTH-1:0] mask_a,
input wire[WIDTH-1:0] din_b,

output lssample_t[WIDTH-1:0] dout_match = 0
@@ -55,7 +56,7 @@ module DigitalComparator #(

always_ff @(posedge clk) begin

if(din_a == din_b)
if( (din_a & mask_a) == din_b)
dout_match <= din_valid;

else
Original file line number Diff line number Diff line change
@@ -122,7 +122,8 @@ module SerialPatternMatcher #(
.clk(clk),
.din_valid(sampled_valid),
.din_a(sampled),
.din_b(pconfig.targets[i][WIDTH-1:0]),
.mask_a(pconfig.target_masks[i][WIDTH-1:0]),
.din_b(pconfig.target_values[i][WIDTH-1:0]),
.dout_match(match_found[i])
);

Original file line number Diff line number Diff line change
@@ -48,7 +48,8 @@ typedef struct packed

//Config bits: Constant values to match against
//(only low WIDTH bits are used)
target_t[3:0] targets;
target_t[3:0] target_values;
target_t[3:0] target_masks;

} spmeconfig_t;

2 changes: 1 addition & 1 deletion rtl/MAXWELL/main-fpga/main-fpga.xpr
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
<Option Name="IPUserFilesDir" Val="$PIPUSERFILESDIR"/>
<Option Name="IPStaticSourceDir" Val="$PIPUSERFILESDIR/ipstatic"/>
<Option Name="EnableBDX" Val="FALSE"/>
<Option Name="WTXSimLaunchSim" Val="86"/>
<Option Name="WTXSimLaunchSim" Val="90"/>
<Option Name="WTModelSimLaunchSim" Val="0"/>
<Option Name="WTQuestaLaunchSim" Val="0"/>
<Option Name="WTIesLaunchSim" Val="0"/>