Closed JimLewis closed 6 months ago
I am all for making messages more readable. That said, when I instance the AxiStreamTransmitter, I give it the instance label, AxiStreamTransmitter_1, and hence my messages print as:
In AxiStreamTransmitter_1, Unimplemented Transaction: CHECK
The OSVVM testbenches use this same naming convention.
That said, I am not against adding the word Transmitter to transmitter messages
Going further, Stream MIT could provide a function that classifies the transactions into Transmitter and Receiver operations. That way a transmitter could use that to choose to print either depending on the results of IsTransmitterOperation
:
Unimplemented Transmitter Transaction: SEND_BURST
or
Transmitter received Receiver Transaction: CHECK
Maybe rather than IsTransmitterOperation
since all receivers and transmitters should do this, it should be ClassifyUnimplementedTransmitterOperation
and ClassifyUnimplementedReceiverOperation
that internally use IsTransmitterOperation
and IsReceiverOperation
to return a proper string message. So for the transmitter the alert then could be:
Alert(ModelID, ClassifyUnimplementedTransmitterOperation(Transmitter.Operation), FAILURE) ;
To address this, AddressBusTransactionPkg added
------------------------------------------------------------
function ClassifyUnimplementedOperation (
-----------------------------------------------------------
constant Operation : In AddressBusOperationType ;
constant TransactionCount : in natural
) return string is
begin
if Operation = MULTIPLE_DRIVER_DETECT then
return "Multiple Drivers on Transaction Record." &
" Transaction # " & to_string(TransactionCount) ;
else
return "Unimplemented Transaction: " & to_string(Operation) &
" Transaction # " & to_string(TransactionCount) ;
end if ;
end function ClassifyUnimplementedOperation ;
StreamTransactionPkg implemented: ClassifyUnimplementedOperation ClassifyUnimplementedTransmitterOperation ClassifyUnimplementedReceiverOperation
Submitted by @Paebbels via Gitter: in AXI4 Transmitter, please change
Alert(ModelID, "Unimplemented Transaction: " & to_string(TransRec.Operation), FAILURE) ;
to denote an operation like GET|CHECK|... is not supported by a transmitter. likewise, implement a better message that a SEND is not supported by a receiver. E.g. Unimplemented Transmitter Transaction: CHECK. This is possible, because TX and RX in AXI4-Stream use the same record datatype and can be assigned/used crosswise.