Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
8928bfc
change to fsdb
ansaschmulbach May 3, 2024
399ebcd
update sb raw tx
ansaschmulbach May 3, 2024
ad50bfd
update sb raw rx
ansaschmulbach May 3, 2024
9bcf715
update sb raw rx
ansaschmulbach May 3, 2024
e545d8e
update sb raw rx
ansaschmulbach May 3, 2024
dee4b27
delay sb rx clock
ansaschmulbach May 3, 2024
20f8f90
delay sb rx clock
ansaschmulbach May 3, 2024
0af0db2
questionable clock hack attempt 1
ansaschmulbach May 3, 2024
209f927
questionable clock hack attempt 1
ansaschmulbach May 3, 2024
663c3dc
correct msg source
ansaschmulbach May 3, 2024
c0768f2
correct msg source
ansaschmulbach May 3, 2024
9cfa8db
correct msg source
ansaschmulbach May 3, 2024
d80a451
correct msg source
ansaschmulbach May 3, 2024
e83da09
unsure -- sb timing issue
ansaschmulbach May 3, 2024
22c1fcb
add async fifo
ansaschmulbach May 3, 2024
68ea5b6
weird clock hacks pt 2
ansaschmulbach May 3, 2024
368a950
clock mux?
ansaschmulbach May 3, 2024
0b8838a
clock mux?
ansaschmulbach May 3, 2024
0b0bc44
mux clocks
ansaschmulbach May 3, 2024
f95d872
mux clocks
ansaschmulbach May 3, 2024
ab3fe15
update test reset
ansaschmulbach May 3, 2024
5761196
clock mux
ansaschmulbach May 3, 2024
13a7554
async reset
ansaschmulbach May 3, 2024
3c689b8
make own counter
ansaschmulbach May 3, 2024
3afae52
make own counter
ansaschmulbach May 3, 2024
ce91b17
make own counter
ansaschmulbach May 3, 2024
052b07f
counter reset value hacks
ansaschmulbach May 4, 2024
c273448
counter reset value hacks
ansaschmulbach May 4, 2024
386ae40
move data inside clock block
ansaschmulbach May 4, 2024
4389f3c
use negedge clock
ansaschmulbach May 4, 2024
7ae41c5
negedge??
ansaschmulbach May 4, 2024
6068bf2
negedge??
ansaschmulbach May 4, 2024
6f4e7be
attempt black box resource
ansaschmulbach May 4, 2024
3517b09
attempt black box resource
ansaschmulbach May 4, 2024
bf68913
attempt black box resource
ansaschmulbach May 4, 2024
a5acb20
attempt black box resource
ansaschmulbach May 4, 2024
986f4c8
attempt black box resource
ansaschmulbach May 4, 2024
27eb7d7
attempt black box resource
ansaschmulbach May 4, 2024
e54aeb4
attempt black box resource
ansaschmulbach May 4, 2024
4e7b9c8
attempt black box resource
ansaschmulbach May 4, 2024
7335895
system clock test
ansaschmulbach May 4, 2024
6de79dd
system clock test
ansaschmulbach May 4, 2024
43d2a9e
system clock test
ansaschmulbach May 4, 2024
a448fdf
revert system clock test
ansaschmulbach May 4, 2024
58541b4
undelayed clock test
ansaschmulbach May 4, 2024
21a271c
sb serializer negedge?
ansaschmulbach May 6, 2024
ced1979
undo un-delay in afe loopback
ansaschmulbach May 6, 2024
430522d
negedge afe loopback test
ansaschmulbach May 6, 2024
78e1a87
hacky serializer cycle delay fix
ansaschmulbach May 6, 2024
1d26025
hacky serializer cycle delay fix
ansaschmulbach May 6, 2024
c0a06e9
hacky serializer cycle delay fix
ansaschmulbach May 6, 2024
e8da256
hacky serializer cycle delay fix
ansaschmulbach May 6, 2024
e4fc256
hacky serializer cycle delay fix
ansaschmulbach May 6, 2024
7b4b87b
add one cycle delay after latching data
ansaschmulbach May 6, 2024
a741c36
add one cycle delay after latching data
ansaschmulbach May 6, 2024
a36c462
add back counter disable?
ansaschmulbach May 6, 2024
c06d406
add back counter disable?
ansaschmulbach May 6, 2024
fd8c8ef
counter disable reset
ansaschmulbach May 6, 2024
1fd615a
remove myid from phy params
ansaschmulbach May 6, 2024
cf2fc37
remove myid from phy params
ansaschmulbach May 6, 2024
8cc8bb5
make clog2
ansaschmulbach May 6, 2024
7ea7829
make clog2
ansaschmulbach May 6, 2024
4418d62
increase test timeout
ansaschmulbach May 6, 2024
cc1bfad
update inbandpres
ansaschmulbach May 6, 2024
1d0b9db
update inbandpres
ansaschmulbach May 6, 2024
6f1e8c8
fix rdi bringup fsm
ansaschmulbach May 6, 2024
0e0e712
trying IOs to push to top
vikramjain236 May 7, 2024
6261498
expose ports to top level
rohanku May 7, 2024
ab8aa41
fix compiler errors
rohanku May 8, 2024
03ec156
ignore logphy test
ansaschmulbach May 8, 2024
8445778
try no async fifo
ansaschmulbach May 8, 2024
d690f16
fix logphy test
ansaschmulbach May 8, 2024
87f982e
compilation bug
ansaschmulbach May 8, 2024
e69956d
fixed the handshake
vikramjain236 May 8, 2024
b70fdf9
first pass mb serdes
vikramjain236 May 8, 2024
ae99f9e
adding mbafe
vikramjain236 May 9, 2024
eae32e2
pll lock set to true
ansaschmulbach May 9, 2024
a97d0e0
correct byte ordering mapping
ansaschmulbach May 9, 2024
82d020f
remove async fifo afe
ansaschmulbach May 9, 2024
bd042fa
remove async fifo afe
ansaschmulbach May 9, 2024
d1a66ce
remove async fifo afe
ansaschmulbach May 9, 2024
5118990
update hasData
ansaschmulbach May 9, 2024
1fa8adf
update mb serializer
ansaschmulbach May 9, 2024
ce12523
update mb serializer
ansaschmulbach May 9, 2024
ed3d728
no clock parking
ansaschmulbach May 9, 2024
0bea641
serialize lsb first
ansaschmulbach May 9, 2024
80f6343
remove async fifo rx
ansaschmulbach May 9, 2024
c9a93ac
change lane update
ansaschmulbach May 9, 2024
a0d6aa5
reverse bit direction rx
ansaschmulbach May 9, 2024
002d012
update out_valid to have cycle delay
ansaschmulbach May 9, 2024
c98cc19
try increase timeout
ansaschmulbach May 9, 2024
dafd44c
fixing the pl_trdy
vikramjain236 May 9, 2024
f5c318d
ucie now on obus
vikramjain236 May 9, 2024
6e481c7
chipyard uci integration with updated tests
vikramjain236 May 9, 2024
bfdf0c6
fix IO directions
ansaschmulbach May 9, 2024
e73ea77
update IO in UCI top
ansaschmulbach May 9, 2024
9ffc634
fix AFE loopback tests IOs
ansaschmulbach May 9, 2024
4eb2cf5
update reset type
ansaschmulbach May 9, 2024
8cd052d
update reset type
ansaschmulbach May 9, 2024
9f045e0
convert clock types
ansaschmulbach May 9, 2024
a4f86a5
connect tx signals correctly
ansaschmulbach May 9, 2024
b378315
loopback afe IO directions
ansaschmulbach May 9, 2024
e2fae7d
bool to clock
ansaschmulbach May 9, 2024
40771af
connect full logphy AFE
ansaschmulbach May 9, 2024
12bf863
initialize pll lock
ansaschmulbach May 9, 2024
3a8eb93
remove fifoparams from sb afe
ansaschmulbach May 9, 2024
2314775
lock PLL
ansaschmulbach May 9, 2024
b4c16ba
get rid of clock mux
ansaschmulbach May 9, 2024
95faa61
get rid of clock mux
ansaschmulbach May 9, 2024
90bd6ae
merging ansa-mb-test branch
vikramjain236 May 9, 2024
fe5b0f7
bug fixes on IOs
vikramjain236 May 9, 2024
db8a7c2
only resent msg in init
ansaschmulbach May 10, 2024
558c184
only resent msg in init
ansaschmulbach May 10, 2024
fd66a8b
Merge branch 'ansa-mb-test' of github.com:ucb-ucie/uciedigital into c…
vikramjain236 May 10, 2024
2bb61df
merge with sb fixes
vikramjain236 May 10, 2024
1be9bd0
bug fixes
vikramjain236 May 12, 2024
3d238de
integration bug fixes
vikramjain236 May 12, 2024
31f8e1e
add pattern writer, error count
ansaschmulbach Jul 17, 2024
b3fdae5
Added a config param to select between standalone or analog ucie and …
vikramjain236 Jul 17, 2024
4a18630
fixing some elaboration issues
vikramjain236 Jul 18, 2024
60f2eb1
finish patternreader
ansaschmulbach Jul 18, 2024
10d803c
update pattern generator to use reader/writer
ansaschmulbach Jul 18, 2024
d6b0a81
add MB pattern generator tests
ansaschmulbach Jul 18, 2024
175d8c0
make per-lane error counting, change RDI data mapper to be LSB-first,…
ansaschmulbach Jul 25, 2024
4fb005c
uninitialized signals because of compile options
vikramjain236 Jul 27, 2024
a3f1588
logphy toplevel compilation, more progress on mb trainer test
ansaschmulbach Jul 30, 2024
4a0784d
merge with logphy integration
ansaschmulbach Aug 2, 2024
f39e2ad
make STANDALONE work
ansaschmulbach Aug 2, 2024
8883194
buffers to fix timing
vikramjain236 Aug 2, 2024
50f45ba
try same clock length
ansaschmulbach Aug 7, 2024
ba9eb5a
restore rxMode/txMode changes from newer logphy
ansaschmulbach Aug 7, 2024
e131950
remove print statement
ansaschmulbach Aug 7, 2024
ab02043
resolve merge conflict
ansaschmulbach Aug 7, 2024
88cf816
fix syntax issue
ansaschmulbach Aug 7, 2024
4161912
Merge pull request #92 from ucb-ucie/pattern-generator
ansaschmulbach Aug 7, 2024
27772a2
test new lanes no compile
ansaschmulbach Aug 8, 2024
13d0d7a
fix compilation errors in data mapper test
ansaschmulbach Aug 8, 2024
abcd851
lane io fix ... ?
ansaschmulbach Aug 8, 2024
916b887
refactor lane code
ansaschmulbach Aug 8, 2024
7f7e31d
another lane refactor
ansaschmulbach Aug 8, 2024
994a4d4
Merge pull request #93 from ucb-ucie/lanes-no-fifo
ansaschmulbach Aug 9, 2024
596f5a1
fix flipped IO
ansaschmulbach Aug 9, 2024
afd352b
Merge pull request #94 from ucb-ucie/lanes-no-fifo
ansaschmulbach Aug 9, 2024
e543a48
obus back
vikramjain236 Aug 10, 2024
e5af874
mmio registers for training
vikramjain236 Aug 10, 2024
113590f
fix RDI data mapper assertion
ansaschmulbach Aug 10, 2024
ecb8a5a
Merge branch 'new_chipyard_int' of github.com:ucb-ucie/uciedigital in…
ansaschmulbach Aug 10, 2024
6ff00be
fix lack of parameter passing in dafe
ansaschmulbach Aug 10, 2024
96f14be
update IOs to add valids
ansaschmulbach Aug 11, 2024
4160e13
fix a few elaboration errors
rohanku Aug 11, 2024
e802a64
update mb trainer IOs
ansaschmulbach Aug 12, 2024
d8ab141
update to CIRCT
kevindna Dec 2, 2024
cb45b8d
support wider (256b) sys bus
kevindna Feb 3, 2025
67adaec
code cleanup and force module name
Feb 14, 2025
97c4c5d
add user FibonacciLFSR which is deterministic and prevents uniquifica…
Feb 14, 2025
c7585c1
worthless commit
Feb 14, 2025
36ac1bf
attempt to fix pll lock issue
rohanku May 13, 2025
c6bfea4
update link training fsm
rohanku Jun 18, 2025
5cc5792
get full system uciedigital simulations working
rohanku Jun 18, 2025
d1f43c9
fix ordering of rx data
rohanku Jun 30, 2025
f894fa2
add todos
rohanku Sep 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 200 additions & 0 deletions src/main/resources/vsrc/AsyncFifoCustomCore.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
// Code your design here
module AsyncFifoCustomCore #(
parameter DEPTH = 16,
parameter WIDTH = 8
)(
input rst,

input clk_w,
input valid_w,
output ready_w,
input [WIDTH-1:0] data_w,

input clk_r,
output valid_r,
input ready_r,
output [WIDTH-1:0] data_r
);
localparam PTR_WIDTH = $clog2(DEPTH);


wire [PTR_WIDTH:0] b_wptr;
wire [PTR_WIDTH:0] b_rptr;
wire [PTR_WIDTH:0] g_wptr;
wire [PTR_WIDTH:0] g_rptr;
wire [PTR_WIDTH:0] g_wptr_sync;
wire [PTR_WIDTH:0] g_rptr_sync;
wire full, empty;

Sync2Flop #(PTR_WIDTH + 1) wptrSync (.clk(clk_w), .rst(rst), .in(g_wptr), .out(g_wptr_sync));
Sync2Flop #(PTR_WIDTH + 1) rptrSync (.clk(clk_r), .rst(rst), .in(g_rptr), .out(g_rptr_sync));
WptrHandler #(PTR_WIDTH) wptrHandler (.clk(clk_w), .rst(rst), .en(valid_w), .g_rptr_sync(g_rptr_sync),
.g_wptr(g_wptr), .b_wptr(b_wptr), .full(full));
RptrHandler #(PTR_WIDTH) rptrHandler (.clk(clk_r), .rst(rst), .en(ready_r), .g_wptr_sync(g_wptr_sync),
.g_rptr(g_rptr), .b_rptr(b_rptr), .empty(empty));
Fifo #(PTR_WIDTH, WIDTH) fifo (.rst(rst),
.clk_w(clk_w), .en_w(valid_w), .data_w(data_w), .b_wptr(b_wptr), .full(full),
.clk_r(clk_r), .en_r(ready_r), .data_r(data_r), .b_rptr(b_rptr), .empty(empty));
assign valid_r = ~empty;
assign ready_w = ~full;

endmodule

module Sync2Flop #(
parameter PTR_WIDTH = 8
)(
input clk,
input rst,
input [PTR_WIDTH-1:0] in,
output reg [PTR_WIDTH-1:0] out
);
reg [PTR_WIDTH-1:0] mid;
always_ff @(posedge clk, negedge rst) begin
if (~rst) begin
out <= '0;
mid <= '0;
end else begin
out <= mid;
mid <= in;
end
end
endmodule

module WptrHandler #(
parameter PTR_WIDTH = 8
)(
input clk,
input rst,
input en,
input [PTR_WIDTH:0] g_rptr_sync,
output reg [PTR_WIDTH:0] g_wptr, b_wptr,
output reg full
);
wire [PTR_WIDTH:0] g_wptr_next;
wire [PTR_WIDTH:0] b_wptr_next;
wire full_next;

assign b_wptr_next = b_wptr + (en & ~full);
assign g_wptr_next = b_wptr_next ^ (b_wptr_next >> 1);
assign full_next = g_wptr_next == {~g_rptr_sync[PTR_WIDTH:PTR_WIDTH-1], g_rptr_sync[PTR_WIDTH-2:0]};

always_ff @(posedge clk, negedge rst) begin
if(~rst) begin
g_wptr <= '0;
b_wptr <= '0;
full <= '0;
// g_wptr <= g_wptr_next;
// b_wptr <= b_wptr_next;
// full <= full_next;
end else begin
g_wptr <= g_wptr_next;
b_wptr <= b_wptr_next;
full <= full_next;
end
end

endmodule

module RptrHandler #(
parameter PTR_WIDTH = 8
)(
input clk,
input rst,
input en,
input [PTR_WIDTH:0] g_wptr_sync,
output reg [PTR_WIDTH:0] g_rptr, b_rptr,
output reg empty
);
wire [PTR_WIDTH:0] g_rptr_next;
wire [PTR_WIDTH:0] b_rptr_next;
wire empty_next;

assign b_rptr_next = b_rptr + (en & ~empty);
assign g_rptr_next = b_rptr_next ^ (b_rptr_next >> 1);
assign empty_next = g_rptr_next == g_wptr_sync;

always_ff @(posedge clk, negedge rst) begin
if(~rst) begin
g_rptr <= '0;
b_rptr <= '0;
empty <= '1;
end else begin
g_rptr <= g_rptr_next;
b_rptr <= b_rptr_next;
empty <= empty_next;
end
end

endmodule

module Fifo #(
parameter PTR_WIDTH = 8,
parameter WIDTH = 8
)(
input rst,
// Write
input [WIDTH-1:0] data_w,
input clk_w,
input en_w,
input [PTR_WIDTH:0] b_wptr,
input full,
// Read
output reg [WIDTH-1:0] data_r,
input clk_r,
input en_r,
input [PTR_WIDTH:0] b_rptr,
input empty
);
localparam ENTRIES = 2**PTR_WIDTH;
integer i;
reg [WIDTH-1:0] fifoBank [0:ENTRIES-1];
always_ff @(posedge clk_w, negedge rst) begin
if(~rst) begin
for(i = 0; i < ENTRIES; i++) begin
fifoBank[i] <= 'b0;
end
end else if (en_w & ~full) begin
fifoBank[b_wptr[PTR_WIDTH-1:0]] <= data_w;
end else begin
for(i = 0; i < ENTRIES; i++) begin
fifoBank[i] <= fifoBank[i];
end
end
end

// always_ff @(posedge clk_r) begin
// if(en_r & ~empty) begin
// data_r <= fifoBank[b_rptr[PTR_WIDTH-1:0]];
// end
// end

assign data_r = fifoBank[b_rptr[PTR_WIDTH-1:0]];
endmodule

module BinaryToGray #(
parameter WIDTH = 8
)(
input [WIDTH-1:0] in,
output [WIDTH-1:0] out
);

genvar i;
assign out[WIDTH-1] = in[WIDTH - 1];
for(i = WIDTH - 2; i >= 0; i--) begin
assign out[i] = in[i] ^ in[i + 1];
end

endmodule

module GrayToBinary #(
parameter WIDTH = 8
)(
input [WIDTH-1:0] in,
output [WIDTH-1:0] out
);
genvar i;
assign out[WIDTH-1] = in[WIDTH - 1];
for(i = WIDTH - 2; i >= 0; i--) begin
assign out[i] = ^(in >> i);
end
endmodule
14 changes: 14 additions & 0 deletions src/main/resources/vsrc/ClockSelector.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module ClockMux2 (
input clocksIn_0,
input clocksIn_1,
input sel,
output clockOut
);

// REPLACE ME WITH A CLOCK CELL IF DESIRED

// XXX be careful with this! You can get really nasty short edges if you
// don't switch carefully
assign clockOut = sel ? clocksIn_1 : clocksIn_0;

endmodule
45 changes: 45 additions & 0 deletions src/main/resources/vsrc/SBDeserializer.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module SBDeserializerBlackBox #(
parameter WIDTH = 128,
parameter WIDTH_W = $clog2(WIDTH)
) (
input clk,
input rst,
input in_data,
output [WIDTH - 1:0] out_data,
output out_data_valid

);

reg [WIDTH_W-1:0] counter;
reg [WIDTH-1:0] data_reg;
reg receiving;
wire recvDone;

assign out_data = data_reg;
assign recvDone = counter == (WIDTH - 1);
assign out_data_valid = !receiving;

always @(negedge clk or posedge rst) begin
if (rst) begin
counter <= 0;
receiving <= 1'b1;
end else begin
if (recvDone) begin
counter <= 0;
receiving <= 1'b0;
end else begin
counter <= counter + 1'b1;
receiving <= 1'b1;
end

// if (out_data_valid && out_data_ready) begin
// receiving <= 1'b1;
// end

data_reg[counter] <= in_data;

end

end

endmodule
13 changes: 13 additions & 0 deletions src/main/resources/vsrc/SBSerializer.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module SBSerializerBlackBox #(
parameter WIDTH = 128,
parameter WIDTH_W = $clog2(WIDTH)
) (

input clk,
input rst,
input [WIDTH - 1:0] in_data,
output out_data

);

endmodule
1 change: 1 addition & 0 deletions src/main/scala/DummyModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ class DummyModule extends Module {
val b = Output(Bool())
})


io.b := ~io.a
}
34 changes: 17 additions & 17 deletions src/main/scala/d2dadapter/D2DSidebandModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,39 +65,39 @@ class D2DSidebandModule(val fdiParams: FdiParams, val sbParams: SidebandParams)
sideband_switch.io.inner.layer_to_node_above.bits := 0.U(sbParams.sbNodeMsgWidth.W)
sideband_switch.io.inner.layer_to_node_above.valid := false.B

sideband_switch.io.inner.node_to_layer_below.ready := false.B
sideband_switch.io.inner.node_to_layer_below.ready := true.B
sideband_switch.io.inner.node_to_layer_above.ready := true.B

when(sideband_switch.io.inner.node_to_layer_above.valid && sideband_switch.io.inner.node_to_layer_above.ready){
when(sideband_switch.io.inner.node_to_layer_above.bits === SBM.LINK_MGMT_ADAPTER0_REQ_ACTIVE){
when(sideband_switch.io.inner.node_to_layer_below.valid && sideband_switch.io.inner.node_to_layer_below.ready){
when(sideband_switch.io.inner.node_to_layer_below.bits === SBM.LINK_MGMT_ADAPTER0_REQ_ACTIVE){
io.sideband_rcv := SideBandMessage.REQ_ACTIVE
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.LINK_MGMT_ADAPTER0_REQ_L1){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.LINK_MGMT_ADAPTER0_REQ_L1){
io.sideband_rcv := SideBandMessage.REQ_L1
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.LINK_MGMT_ADAPTER0_REQ_L2){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.LINK_MGMT_ADAPTER0_REQ_L2){
io.sideband_rcv := SideBandMessage.REQ_L2
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.LINK_MGMT_ADAPTER0_REQ_LINK_RESET){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.LINK_MGMT_ADAPTER0_REQ_LINK_RESET){
io.sideband_rcv := SideBandMessage.REQ_LINKRESET
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.LINK_MGMT_ADAPTER0_REQ_DISABLE){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.LINK_MGMT_ADAPTER0_REQ_DISABLE){
io.sideband_rcv := SideBandMessage.REQ_DISABLED
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.LINK_MGMT_ADAPTER0_RSP_ACTIVE){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.LINK_MGMT_ADAPTER0_RSP_ACTIVE){
io.sideband_rcv := SideBandMessage.RSP_ACTIVE
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.LINK_MGMT_ADAPTER0_RSP_PM_NAK){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.LINK_MGMT_ADAPTER0_RSP_PM_NAK){
io.sideband_rcv := SideBandMessage.RSP_PMNAK
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.LINK_MGMT_ADAPTER0_RSP_L1){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.LINK_MGMT_ADAPTER0_RSP_L1){
io.sideband_rcv := SideBandMessage.RSP_L1
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.LINK_MGMT_ADAPTER0_RSP_L2){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.LINK_MGMT_ADAPTER0_RSP_L2){
io.sideband_rcv := SideBandMessage.RSP_L2
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.LINK_MGMT_ADAPTER0_RSP_LINK_RESET){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.LINK_MGMT_ADAPTER0_RSP_LINK_RESET){
io.sideband_rcv := SideBandMessage.RSP_LINKRESET
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.LINK_MGMT_ADAPTER0_RSP_DISABLE){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.LINK_MGMT_ADAPTER0_RSP_DISABLE){
io.sideband_rcv := SideBandMessage.RSP_DISABLED
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.PARITY_FEATURE_REQ){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.PARITY_FEATURE_REQ){
io.sideband_rcv := SideBandMessage.PARITY_FEATURE_REQ
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.PARITY_FEATURE_ACK){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.PARITY_FEATURE_ACK){
io.sideband_rcv := SideBandMessage.PARITY_FEATURE_ACK
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.PARITY_FEATURE_NAK){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.PARITY_FEATURE_NAK){
io.sideband_rcv := SideBandMessage.PARITY_FEATURE_NAK
}.elsewhen(sideband_switch.io.inner.node_to_layer_above.bits === SBM.ADV_CAP){
}.elsewhen(sideband_switch.io.inner.node_to_layer_below.bits === SBM.ADV_CAP){
io.sideband_rcv := SideBandMessage.ADV_CAP
}.otherwise{
io.sideband_rcv := SideBandMessage.NOP
Expand Down
8 changes: 8 additions & 0 deletions src/main/scala/d2dadapter/LinkInitSubmodule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,14 @@ class LinkInitSubmodule() extends Module {
linkinit_state_reg := LinkInitState.INIT_DONE
}
}
}.elsewhen(io.link_state === PhyState.active){
io.active_entry := true.B
io.linkinit_fdi_pl_state_sts := PhyState.active
io.linkinit_fdi_pl_rxactive_req := true.B
io.linkinit_fdi_pl_inband_pres := true.B
io.linkinit_rdi_lp_state_req := PhyStateReq.active
io.linkinit_sb_snd := SideBandMessage.NOP
linkinit_state_reg := LinkInitState.INIT_DONE
}.otherwise{
linkinit_state_reg := LinkInitState.INIT_START
io.active_entry := false.B
Expand Down
Loading
Loading