@@ -464,6 +464,11 @@ module ccc
464
464
assign is_byte_our_virtual_static_addr = ((command_addr == virtual_target_sta_address_i) && virtual_target_sta_address_valid_i);
465
465
assign is_byte_virtual_addr = is_byte_our_virtual_dynamic_addr | is_byte_our_virtual_static_addr;
466
466
467
+ logic direct_addr_ack;
468
+
469
+ assign direct_addr_ack = (command_code == `I3C_DIRECT_SETDASA ) ? ((is_byte_our_static_addr && ~ target_dyn_address_valid_i) | (is_byte_our_virtual_static_addr && ~ virtual_target_dyn_address_valid_i)) :
470
+ (is_byte_our_addr | is_byte_rsvd_addr | is_byte_virtual_addr);
471
+
467
472
always_ff @ (posedge clk_i or negedge rst_ni) begin : proc_addr
468
473
if (~ rst_ni) begin
469
474
command_addr <= '0 ;
@@ -573,12 +578,19 @@ module ccc
573
578
end
574
579
TxDirectAddrAck: begin
575
580
if (bus_tx_done_i) begin
576
- if (is_byte_rsvd_addr) state_d = NextCCC;
577
- else if ((is_byte_our_addr || is_byte_virtual_addr) && command_rnw) state_d = TxData;
578
- else if ((is_byte_our_addr || is_byte_virtual_addr) && ~ command_rnw) begin
579
- if (command_code == `I3C_DIRECT_SETXTIME ) state_d = RxSubCmdByte;
581
+ if (command_code == `I3C_DIRECT_SETDASA ) begin
582
+ if (is_byte_our_static_addr && target_dyn_address_valid_i) state_d = WaitForBusCond;
583
+ else if (is_byte_our_virtual_static_addr && virtual_target_dyn_address_valid_i) state_d = WaitForBusCond;
580
584
else state_d = RxData;
581
- end else state_d = WaitForBusCond;
585
+ end
586
+ else begin
587
+ if (is_byte_rsvd_addr) state_d = NextCCC;
588
+ else if ((is_byte_our_addr || is_byte_virtual_addr) && command_rnw) state_d = TxData;
589
+ else if ((is_byte_our_addr || is_byte_virtual_addr) && ~ command_rnw) begin
590
+ if (command_code == `I3C_DIRECT_SETXTIME ) state_d = RxSubCmdByte;
591
+ else state_d = RxData;
592
+ end else state_d = WaitForBusCond;
593
+ end
582
594
end
583
595
end
584
596
@@ -664,7 +676,7 @@ module ccc
664
676
TxDirectAddrAck: begin
665
677
ccc_tx_req_byte = '0 ;
666
678
ccc_tx_req_bit = '1 ;
667
- ccc_tx_req_value = { 7'h00 , ~ (is_byte_our_addr | is_byte_rsvd_addr | is_byte_virtual_addr) } ;
679
+ ccc_tx_req_value = { 7'h00 , ~ direct_addr_ack } ;
668
680
end
669
681
RxSubCmdByte: begin
670
682
end
0 commit comments