Skip to content

Commit

Permalink
[tlul, vh] Move internal access signal declaration
Browse files Browse the repository at this point in the history
Some tools do not allow signal accesses before their declaration.

Signed-off-by: Andrea Caforio <[email protected]>
  • Loading branch information
andrea-caforio authored and vogelpi committed Dec 9, 2024
1 parent a9b9558 commit 9824c23
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions hw/ip/tlul/rtl/tlul_adapter_vh.sv
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ module tlul_adapter_vh
output logic [ID_WIDTH-1:0] int_id_o
);

// The adapter distinguishes between two types of VH accesses: those going to an internal register
// file and those targeting OpenTitan registers, with the latter ones being translated into TLUL
// requests while the other requests are relayed to the internal register file.
logic internal_access;
assign internal_access = addr_i >= VH_REGISTER_ADDRESS_OFFSET;

// Differentiate between two levels of acknowledgements:
// - `req_ack`: A host-to-device request is acknowledged by the device, meaning that the response
// is pending.
Expand Down Expand Up @@ -100,12 +106,6 @@ module tlul_adapter_vh
a_param: 3'h0
};

// The adapter distinguishes between two types of VH accesses: those going to an internal register
// file and those targeting OpenTitan registers, with the latter ones being translated into TLUL
// requests while the other requests are relayed to the internal register file.
logic internal_access;
assign internal_access = addr_i >= VH_REGISTER_ADDRESS_OFFSET;

// Accesses to device registers are acknowledged with the TLUL d-channel handshake.
assign hld_o = !pending_q && internal_access && !int_hld_i ? 1'b0 :
pending_q && tl_o.d_ready && tl_i.d_valid ? 1'b0 : 1'b1;
Expand Down

0 comments on commit 9824c23

Please sign in to comment.