Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #468

Support primitive instantiations

Added by Alex Solomatnikov about 7 years ago. Updated almost 7 years ago.

Status:
Feature
Priority:
Low
Assignee:
-
Category:
Unsupported
% Done:

0%


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

#1 Updated by Wilson Snyder about 7 years 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.

#2 Updated by Alex Solomatnikov almost 7 years 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.

#3 Updated by Wilson Snyder almost 7 years 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