Issue #468
Support primitive instantiations
| Status: | Feature | Start date: | 03/23/2012 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | Unsupported | |||
| Target version: | - |
Description
Primitive definition:
primitive PRIM_DFFE (Q, ENA, D, CLK, CLRN, PRN, notifier); input D; input CLRN; input PRN; input CLK; input ENA; input notifier; output Q; reg Q; ...
Primitive instantiation:
module dffe ( Q, CLK, ENA, D, CLRN, PRN ); input D; input CLK; input CLRN; input PRN; input ENA; output Q; wire D_ipd; wire ENA_ipd; wire CLK_ipd; wire PRN_ipd; wire CLRN_ipd; buf (D_ipd, D); buf (ENA_ipd, ENA); buf (CLK_ipd, CLK); buf (PRN_ipd, PRN); buf (CLRN_ipd, CLRN); wire legal; reg viol_notifier; PRIM_DFFE ( Q, ENA_ipd, D_ipd, CLK_ipd, CLRN_ipd, PRN_ipd, viol_notifier ); ...
error:
syntax error, unexpected '(', expecting IDENTIFIER
History
Updated by Wilson Snyder about 1 year ago
- Subject changed from primitive instantiation does not work? to Support primitive instantiations
- Category set to Unsupported
- Status changed from New to Feature
- Priority changed from Normal to Low
Primitives are not synthesizable and are very slow compared to writing good behavioral code and so are unlikely to be supported in the near term.
However if you want to undertake this, there is a bit of code I started on to support them a while ago before I decided it was too nasty for performance.
Updated by Alex Solomatnikov about 1 year ago
BTW, the problem with the code above is that verilator can not parse anonymous primitive instantiation.
If instance name is added, then at least verilator does not complain during parsing.
Updated by Wilson Snyder about 1 year ago
Added disabled test t_udp_noname. Anonymous UDPs will be a pain to support as removing the name results in a parser conflict, requiring a cascade of changes.
Also available in: Atom
![[logo]](/img/veripool_small.png)