-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is not possible to format the code shown below #2238
Comments
@17Reset please provide a minimal example in the issue, following the provided template. |
`timescale 1 ns / 1 ps
module
pcie5_eqif
(
input
wire
pclk
,
input
wire
prstn
,
input
wire
psrst
,
input
wire
[`PCIE_TESTIN_SIZE-1:0]
test_in
,
input
wire
equ_reset
,
input
wire
chgspeed_done
,
input
wire
[`EQRESP_SIZE-1:0]
eq_resp
,
output
wire
[`EQCMD_SIZE-1:0]
eq_cmd
,
input
wire
req_start
,
input
wire
[2:0]
req_cmd
,
output
reg
[2:0]
req_resp
,
output
wire
req_done
,
input
wire
[2:0]
localrxpresethint
,
input
wire
[3:0]
localtxpresetnew
,
input
wire
[17:0]
localcoeffnew
,
output
reg
[3:0]
localtxpresetcur
,
output
reg
[17:0]
localcoeffcur
,
output
reg
[5:0]
localfs
,
output
reg
[5:0]
locallf
,
output
reg
localcoeffrej
,
output
reg
localusepreset
,
input
wire
[17:0]
remotecoeffcur
,
input
wire
[5:0]
remotefs
,
input
wire
[5:0]
remotelf
,
output
reg
[3:0]
remotepresetnew
,
output
reg
[17:0]
remotecoeffnew
,
output
reg
remoteusepreset
,
output
wire
[127:0]
test_out_eqif
)
;
localparam
[1:0]
RQ_IDLE
=
2'd0
,
RQ_CMD
=
2'd1
,
RQ_RESP
=
2'd2
;
reg
[1:0]
lIl0
;
wire
[2:0]
IIl0
;
assign
IIl0
=
eq_resp
[`EQRESP_RESPONSE+:3]
;
always
@
(
negedge
prstn
or
posedge
pclk
)
begin:
req_ctrl
if
(
prstn
==
1'b0
)
begin
lIl0
<=
RQ_IDLE
;
req_resp
<=
`RESP_IDLE
;
localcoeffcur
<=
18'b0
;
localfs
<=
6'b0
;
locallf
<=
6'b0
;
localtxpresetcur
<=
4'h0
;
localcoeffrej
<=
1'b0
;
localusepreset
<=
1'b0
;
remotepresetnew
<=
4'h0
;
remotecoeffnew
<=
18'b0
;
remoteusepreset
<=
1'b0
;
end
else
if
(
psrst
==
1'b1
)
begin
lIl0
<=
RQ_IDLE
;
req_resp
<=
`RESP_IDLE
;
localcoeffcur
<=
18'b0
;
localfs
<=
6'b0
;
locallf
<=
6'b0
;
localtxpresetcur
<=
4'h0
;
localcoeffrej
<=
1'b0
;
localusepreset
<=
1'b0
;
remotepresetnew
<=
4'h0
;
remotecoeffnew
<=
18'b0
;
remoteusepreset
<=
1'b0
;
end
else
begin
case
(
lIl0
)
RQ_CMD
:
if
(
req_cmd
==
`CMD_SETINITPRESET
||
req_cmd
==
`CMD_REQLOCALPRESET
||
req_cmd
==
`CMD_REQLOCALCOEFF
||
req_cmd
==
`CMD_PERFORMRXEVAL
)
lIl0
<=
RQ_RESP
;
else
lIl0
<=
RQ_IDLE
;
RQ_RESP
:
if
(
IIl0
!=
`RESP_IDLE
)
lIl0
<=
RQ_IDLE
;
default
:
if
(
req_start
==
1'b1
)
lIl0
<=
RQ_CMD
;
endcase
// synopsys translate_off
// synthesis translate_off
if
(
lIl0
!=
RQ_RESP
&&
IIl0
!=
`RESP_IDLE
)
$display
(
"%t : %m : ERROR : EQ RESPONSE RECEIVED BUT NO RESPONSE IS EXPECTED"
,
$time
)
;
if
(
lIl0
==
RQ_RESP
&&
IIl0
!=
`RESP_IDLE
&&
(
(
req_cmd
==
`CMD_SETINITPRESET
&&
IIl0
!=
`RESP_LOCALCOEFFMAPPING
)
||
(
req_cmd
==
`CMD_REQLOCALPRESET
&&
IIl0
!=
`RESP_LOCALCOEFFMAPPING
&&
IIl0
!=
`RESP_LOCALCOEFFREJECT
)
||
(
req_cmd
==
`CMD_REQLOCALCOEFF
&&
IIl0
!=
`RESP_LOCALCOEFFACCEPT
&&
IIl0
!=
`RESP_LOCALCOEFFREJECT
)
||
(
req_cmd
==
`CMD_PERFORMRXEVAL
&&
IIl0
!=
`RESP_EQUFAIL
&&
IIl0
!=
`RESP_EQUSUCCESS
&&
IIl0
!=
`RESP_NEWREMOTEPRESET
&&
IIl0
!=
`RESP_NEWREMOTECOEFF
)
)
)
$display
(
"%t : %m : ERROR : INCORRECT RESPONSE RECEIVED (%0d)"
,
$time
,
eq_resp
[`EQRESP_RESPONSE+:3]
)
;
// synthesis translate_on
// synopsys translate_on
if
(
lIl0
==
RQ_RESP
&&
IIl0
!=
`RESP_IDLE
)
req_resp
<=
IIl0
;
if
(
chgspeed_done
==
1'b0
)
localcoeffcur
<=
localcoeffnew
;
else
if
(
lIl0
==
RQ_RESP
&&
IIl0
==
`RESP_LOCALCOEFFMAPPING
)
begin
localcoeffcur
<=
eq_resp
[`EQRESP_LOCALCOEFF_CUR
+:
18]
;
localfs
<=
eq_resp
[`EQRESP_LOCALFS
+:
6]
;
locallf
<=
eq_resp
[`EQRESP_LOCALLF
+:
6]
;
end
else
if
(
lIl0
==
RQ_RESP
&&
(
IIl0
==
`RESP_LOCALCOEFFACCEPT
||
(
IIl0
==
`RESP_LOCALCOEFFREJECT
&&
req_cmd
!=
`CMD_REQLOCALPRESET
)
)
)
localcoeffcur
<=
localcoeffnew
;
if
(
equ_reset
||
(
lIl0
==
RQ_CMD
&&
(
req_cmd
==
`CMD_REMOTECOEFF
||
req_cmd
==
`CMD_REMOTEREQREJECT
||
req_cmd
==
`CMD_REMOTEREQFAIL
)
)
)
begin
remotecoeffnew
<=
remotecoeffcur
;
end
else
if
(
lIl0
==
RQ_RESP
)
begin
if
(
IIl0
==
`RESP_NEWREMOTECOEFF
)
remotecoeffnew
<=
eq_resp
[`EQRESP_REMOTECOEFF_NEW
+:
18]
;
if
(
IIl0
==
`RESP_NEWREMOTEPRESET
)
remotepresetnew
<=
eq_resp
[`EQRESP_REMOTEPRESET_NEW
+:
4]
;
end
if
(
lIl0
==
RQ_RESP
&&
IIl0
!=
`RESP_IDLE
)
begin
if
(
IIl0
==
`RESP_LOCALCOEFFREJECT
)
localcoeffrej
<=
1'b1
;
else
localcoeffrej
<=
1'b0
;
if
(
IIl0
==
`RESP_LOCALCOEFFMAPPING
||
(
IIl0
==
`RESP_LOCALCOEFFREJECT
&&
req_cmd
!=
`CMD_REQLOCALCOEFF
)
)
localtxpresetcur
<=
localtxpresetnew
;
if
(
IIl0
==
`RESP_LOCALCOEFFMAPPING
||
(
IIl0
==
`RESP_LOCALCOEFFREJECT
&&
req_cmd
!=
`CMD_REQLOCALCOEFF
)
)
localusepreset
<=
1'b1
;
else
if
(
IIl0
==
`RESP_LOCALCOEFFACCEPT
||
IIl0
==
`RESP_LOCALCOEFFREJECT
)
localusepreset
<=
1'b0
;
end
if
(
equ_reset
)
remoteusepreset
<=
1'b0
;
else
if
(
lIl0
==
RQ_RESP
&&
IIl0
!=
`RESP_IDLE
)
begin
if
(
req_cmd
==
`CMD_REMOTEREQREJECT
||
req_cmd
==
`CMD_REMOTEREQFAIL
)
remoteusepreset
<=
1'b0
;
else
if
(
IIl0
==
`RESP_NEWREMOTEPRESET
)
remoteusepreset
<=
1'b1
;
else
if
(
IIl0
==
`RESP_NEWREMOTECOEFF
)
remoteusepreset
<=
1'b0
;
end
end
end
assign
eq_cmd
=
{
localrxpresethint
,
localtxpresetnew
,
localcoeffnew
,
remotelf
,
remotefs
,
remotecoeffcur
,
(
lIl0
==
RQ_CMD
)
?
req_cmd
:
`CMD_IDLE
}
;
assign
req_done
=
(
lIl0
==
RQ_IDLE
&&
req_start
==
1'b0
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[17:0]
=
remotecoeffnew
;
assign
test_out_eqif
[21:18]
=
remotepresetnew
;
assign
test_out_eqif
[22]
=
remoteusepreset
;
assign
test_out_eqif
[40:23]
=
localcoeffnew
;
assign
test_out_eqif
[44:41]
=
localtxpresetnew
;
assign
test_out_eqif
[45]
=
localusepreset
;
assign
test_out_eqif
[48:46]
=
localrxpresethint
;
assign
test_out_eqif
[52:49]
=
localtxpresetcur
;
assign
test_out_eqif
[70:53]
=
localcoeffcur
;
assign
test_out_eqif
[76:71]
=
localfs
;
assign
test_out_eqif
[82:77]
=
locallf
;
assign
test_out_eqif
[100:83]
=
remotecoeffcur
;
assign
test_out_eqif
[106:101]
=
remotefs
;
assign
test_out_eqif
[112:107]
=
remotelf
;
assign
test_out_eqif
[113]
=
(
eq_cmd
[`EQCMD_COMMAND
+:
3]
==
`CMD_SETINITPRESET
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[114]
=
(
eq_cmd
[`EQCMD_COMMAND
+:
3]
==
`CMD_REQLOCALPRESET
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[115]
=
(
eq_cmd
[`EQCMD_COMMAND
+:
3]
==
`CMD_REQLOCALCOEFF
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[116]
=
(
eq_cmd
[`EQCMD_COMMAND
+:
3]
==
`CMD_REMOTECOEFF
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[117]
=
(
eq_cmd
[`EQCMD_COMMAND
+:
3]
==
`CMD_PERFORMRXEVAL
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[118]
=
(
eq_cmd
[`EQCMD_COMMAND
+:
3]
==
`CMD_REMOTEREQREJECT
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[119]
=
(
eq_cmd
[`EQCMD_COMMAND
+:
3]
==
`CMD_REMOTEREQFAIL
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[120]
=
(
eq_resp
[`EQRESP_RESPONSE
+:
3]
==
`RESP_LOCALCOEFFMAPPING
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[121]
=
(
eq_resp
[`EQRESP_RESPONSE
+:
3]
==
`RESP_LOCALCOEFFACCEPT
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[122]
=
(
eq_resp
[`EQRESP_RESPONSE
+:
3]
==
`RESP_LOCALCOEFFREJECT
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[123]
=
(
eq_resp
[`EQRESP_RESPONSE
+:
3]
==
`RESP_NEWREMOTEPRESET
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[124]
=
(
eq_resp
[`EQRESP_RESPONSE
+:
3]
==
`RESP_NEWREMOTECOEFF
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[125]
=
(
eq_resp
[`EQRESP_RESPONSE
+:
3]
==
`RESP_EQUSUCCESS
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[126]
=
(
eq_resp
[`EQRESP_RESPONSE
+:
3]
==
`RESP_EQUFAIL
)
?
1'b1
:
1'b0
;
assign
test_out_eqif
[127]
=
1'b0
;
endmodule
|
Run the above code with the command
|
There is also the problem shown below, which is the result of a code sample and format: assign test_out_eqif[113] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_SETINITPRESET) ? 1'b1 : 1'b0;
assign test_out_eqif [114] = ( eq_cmd [`EQCMD_COMMAND +: 3] == `CMD_REQLOCALPRESET ) ? 1'b1 : 1'b0 ;
assign test_out_eqif[115] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_REQLOCALCOEFF) ? 1'b1 : 1'b0;
assign test_out_eqif[116] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_REMOTECOEFF) ? 1'b1 : 1'b0;
assign test_out_eqif[117] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_PERFORMRXEVAL) ? 1'b1 : 1'b0;
assign test_out_eqif [118] = ( eq_cmd [`EQCMD_COMMAND +: 3] == `CMD_REMOTEREQREJECT ) ? 1'b1 : 1'b0 ;
assign test_out_eqif[119] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_REMOTEREQFAIL) ? 1'b1 : 1'b0;
assign test_out_eqif [120] = ( eq_resp [`EQRESP_RESPONSE +: 3] == `RESP_LOCALCOEFFMAPPING ) ? 1'b1 : 1'b0 ;
assign test_out_eqif [121] = ( eq_resp [`EQRESP_RESPONSE +: 3] == `RESP_LOCALCOEFFACCEPT ) ? 1'b1 : 1'b0 ;
assign test_out_eqif [122] = ( eq_resp [`EQRESP_RESPONSE +: 3] == `RESP_LOCALCOEFFREJECT ) ? 1'b1 : 1'b0 ;
assign test_out_eqif [123] = ( eq_resp [`EQRESP_RESPONSE +: 3] == `RESP_NEWREMOTEPRESET ) ? 1'b1 : 1'b0 ;
assign test_out_eqif [124] = ( eq_resp [`EQRESP_RESPONSE +: 3] == `RESP_NEWREMOTECOEFF ) ? 1'b1 : 1'b0 ;
assign test_out_eqif [125] = ( eq_resp [`EQRESP_RESPONSE +: 3] == `RESP_EQUSUCCESS ) ? 1'b1 : 1'b0 ;
assign test_out_eqif[126] = (eq_resp[`EQRESP_RESPONSE+:3] == `RESP_EQUFAIL) ? 1'b1 : 1'b0;
assign test_out_eqif[127] = 1'b0; assign test_out_eqif[113] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_SETINITPRESET) ? 1'b1 : 1'b0;
assign test_out_eqif[114] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_REQLOCALPRESET) ? 1'b1 : 1'b0;
assign test_out_eqif[115] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_REQLOCALCOEFF) ? 1'b1 : 1'b0;
assign test_out_eqif[116] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_REMOTECOEFF) ? 1'b1 : 1'b0;
assign test_out_eqif[117] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_PERFORMRXEVAL) ? 1'b1 : 1'b0;
assign test_out_eqif[118] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_REMOTEREQREJECT) ? 1'b1 : 1'b0;
assign test_out_eqif[119] = (eq_cmd[`EQCMD_COMMAND+:3] == `CMD_REMOTEREQFAIL) ? 1'b1 : 1'b0;
assign test_out_eqif [120] = ( eq_resp [`EQRESP_RESPONSE +: 3] == `RESP_LOCALCOEFFMAPPING ) ? 1'b1 : 1'b0 ;
assign test_out_eqif [121] = ( eq_resp [`EQRESP_RESPONSE +: 3] == `RESP_LOCALCOEFFACCEPT ) ? 1'b1 : 1'b0 ;
assign test_out_eqif [122] = ( eq_resp [`EQRESP_RESPONSE +: 3] == `RESP_LOCALCOEFFREJECT ) ? 1'b1 : 1'b0 ;
assign test_out_eqif[123] = (eq_resp[`EQRESP_RESPONSE+:3] == `RESP_NEWREMOTEPRESET) ? 1'b1 : 1'b0;
assign test_out_eqif[124] = (eq_resp[`EQRESP_RESPONSE+:3] == `RESP_NEWREMOTECOEFF) ? 1'b1 : 1'b0;
assign test_out_eqif[125] = (eq_resp[`EQRESP_RESPONSE+:3] == `RESP_EQUSUCCESS) ? 1'b1 : 1'b0;
assign test_out_eqif[126] = (eq_resp[`EQRESP_RESPONSE+:3] == `RESP_EQUFAIL) ? 1'b1 : 1'b0;
assign test_out_eqif[127] = 1'b0; |
pcie5_cfgchk.zip
The text was updated successfully, but these errors were encountered: