Write to CDI in app mode blocks read access

Signed-off-by: Joachim Strömbergson <joachim@assured.se>
This commit is contained in:
Joachim Strömbergson 2024-04-16 10:29:21 +02:00 committed by Michael Cardell Widerkrantz
parent 4dbf31cc74
commit d620ab1a03
No known key found for this signature in database
GPG Key ID: D3DB3DDF57E704E5
1 changed files with 3 additions and 8 deletions

View File

@ -75,7 +75,6 @@ module tk1(
localparam ADDR_CDI_FIRST = 8'h20;
localparam ADDR_CDI_LAST = 8'h27;
localparam ADDR_CDI_DONE = 8'h28;
localparam ADDR_UDI_FIRST = 8'h30;
localparam ADDR_UDI_LAST = 8'h31;
@ -436,13 +435,9 @@ module tk1(
end
end
if ((address >= ADDR_CDI_FIRST) && (address <= ADDR_CDI_LAST)) begin
if (!switch_app_reg) begin
cdi_mem_we = 1'h1;
end
end
if (address == ADDR_CDI_DONE) begin
if ((address >= ADDR_CDI_FIRST) && (address <= ADDR_CDI_LAST) & !switch_app_reg ) begin
cdi_mem_we = 1'h1;
end else begin
cdi_access_we = 1'h1;
end