Skip to content

Commit ea41bd3

Browse files
committed
entdaa: send dcr and bcr
1 parent 113f4d6 commit ea41bd3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/ctrl/ccc.sv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,8 @@ module ccc
982982
.clk_i, // Clock
983983
.rst_ni, // Async reset, active low
984984
.id_i,
985+
.bcr_i(get_bcr_i),
986+
.dcr_i(get_dcr_i),
985987

986988
.start_daa_i(entdaa_o),
987989
.done_daa_o(entdaa_done),

src/ctrl/ccc_entdaa.sv

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ module ccc_entdaa
55
input logic clk_i, // Clock
66
input logic rst_ni, // Async reset, active low
77
input logic [47:0] id_i,
8+
input logic [7:0] dcr_i,
9+
input logic [7:0] bcr_i,
810

911
input logic start_daa_i,
1012
output logic done_daa_o,
@@ -52,20 +54,22 @@ module ccc_entdaa
5254
} state_e;
5355

5456
state_e state_q, state_d;
55-
logic [5:0] id_bit_count;
57+
logic [6:0] id_bit_count;
5658
logic load_id_counter, tick_id_counter;
5759
logic reserved_word_det;
5860

61+
logic [63:0] device_id;
5962
logic parity_ok;
6063

6164
assign reserved_word_det = (bus_rx_data_i[7:1] == 7'h7e && bus_rx_data_i[0] == 1'b1);
65+
assign device_id = {id_i, bcr_i, dcr_i};
6266

6367
always_ff @(posedge clk_i or negedge rst_ni) begin: id_bit_counter
6468
if (!rst_ni) begin
6569
id_bit_count <= '0;
6670
end else begin
6771
if (load_id_counter) begin
68-
id_bit_count <= 6'd48;
72+
id_bit_count <= 7'd64;
6973
end else if (tick_id_counter) begin
7074
id_bit_count <= id_bit_count - 1'b1;
7175
end else begin
@@ -179,7 +183,7 @@ module ccc_entdaa
179183
end
180184
SendIDBit: begin
181185
bus_tx_req_bit_o = '1;
182-
bus_tx_req_value_o = id_i[id_bit_count];
186+
bus_tx_req_value_o = device_id[id_bit_count];
183187
end
184188
ReceiveAddr: begin
185189
bus_rx_req_byte_o = '1;

0 commit comments

Comments
 (0)