Change UDS address to three bits to match input port connection 'addr'

Signed-off-by: Joachim Strömbergson <joachim@assured.se>
This commit is contained in:
Joachim Strömbergson 2024-03-19 13:57:17 +01:00 committed by Michael Cardell Widerkrantz
parent bbde62d3f5
commit f364b523cf
No known key found for this signature in database
GPG key ID: D3DB3DDF57E704E5
2 changed files with 8 additions and 17 deletions

View file

@ -20,19 +20,12 @@ module uds(
input wire fw_app_mode,
input wire cs,
input wire [7 : 0] address,
input wire [2 : 0] address,
output wire [31 : 0] read_data,
output wire ready
);
//----------------------------------------------------------------
// Internal constant and parameter definitions.
//----------------------------------------------------------------
localparam ADDR_UDS_FIRST = 8'h10;
localparam ADDR_UDS_LAST = 8'h17;
//----------------------------------------------------------------
// Registers including update variables and write enable.
//----------------------------------------------------------------
@ -98,13 +91,11 @@ module uds(
if (cs) begin
tmp_ready = 1'h1;
if ((address >= ADDR_UDS_FIRST) && (address <= ADDR_UDS_LAST)) begin
if (!fw_app_mode) begin
if (uds_rd_reg[address[2 : 0]] == 1'h0) begin
uds_rd_we = 1'h1;
end
end
end
if (!fw_app_mode) begin
if (uds_rd_reg[address[2 : 0]] == 1'h0) begin
uds_rd_we = 1'h1;
end
end
end
end
endmodule // uds