Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Support or lack thereof for sv trireg & recommened alternatives?

Status
Not open for further replies.

wtr

Full Member level 5
Joined
May 1, 2014
Messages
299
Helped
29
Reputation
58
Reaction score
25
Trophy points
1,308
Activity points
4,108
I've inherited some system verilog code. Within the code it has the following


Code SystemVerilog - [expand]
1
2
trireg sd_cmd
assign sd_cmd = sd_cmd_oe ? cmdIn : 1'bz;


Vivado Xsim has thrown a wobbly and has reported this.
XSIM 43-4096 - Trireg is not supported.

So, my questions are simply this.
1. Couldn't I simply have a register
2. What is the point of trireg?

Regards,
 

Ive never seen one before. From googling, trireg was meant to be used for modelling capacitive networks. If it's in some code for an FPGA - sack the coder. If all the drivers are 1'bz, then it retains whatever the last value was (other than Z).

This is obviously someone thinking trireg means "tri-state register". Incorrect. This can be modelled with a simple reg or logic type.
In SV, variable types are far more inter-changable. Just ignore silly things like trireg and any analogue modelling stuff.
 

FPGAs have no internal tristate nodes. Assigning high Z makes only sense for bidirectional inout ports. There's no need of using trireg for it.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top