Skip to content

Commit

Permalink
Fix VCS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kgugala committed Dec 19, 2024
1 parent a0f7abf commit b807d3e
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/ctrl/ccc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -292,18 +292,6 @@ module ccc
end
end

assign last_tbit_valid = (state_q == RxTbit || state_q == RxDataTbit) && bus_rx_done_i;

always_ff @(posedge clk_i or negedge rst_ni) begin : register_tbit
if (~rst_ni) begin
last_tbit <= '0;
end else begin
if (last_tbit_valid) begin
last_tbit <= rx_data[7];
end
end
end

// TODO: Handle Bcast CCCs
typedef enum logic [7:0] {
Idle,
Expand All @@ -323,6 +311,19 @@ module ccc

state_e state_q, state_d;

assign last_tbit_valid = (state_q == RxTbit || state_q == RxDataTbit) && bus_rx_done_i;

always_ff @(posedge clk_i or negedge rst_ni) begin : register_tbit
if (~rst_ni) begin
last_tbit <= '0;
end else begin
if (last_tbit_valid) begin
last_tbit <= rx_data[7];
end
end
end


logic is_direct_cmd;
assign is_direct_cmd = command_code[7]; // 0 - BCast, 1 - Direct

Expand Down Expand Up @@ -571,7 +572,7 @@ module ccc
end

// Handle DIRECT SET CCCs
always_ff begin: proc_set
always_ff @(posedge clk_i or negedge rst_ni) begin: proc_set
if (~rst_ni) begin
set_dasa_valid_o <= 1'b0;
set_dasa_o <= '0;
Expand Down

0 comments on commit b807d3e

Please sign in to comment.