Code Monkey home page Code Monkey logo

bsg_sv2v's People

Contributors

developandplay avatar dpetrisko avatar stdavids avatar taylor-bsg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bsg_sv2v's Issues

add formality checking =)

Seems like this would be a great (optional, add-on) feature to make sure that we are generating correct code.

Yosys errors out due to non-synthesizable event list!

On certain designs, yosys errors out with the following

Note: Assuming pure combinatorial block at ./designs/src/swerv/swerv_wrapper.sv2v.v:75 in
compliance with IEC 62142(E):2005 / IEEE Std. 1364.1(E):2002. Recommending
use of @* instead of @(...) for better match of synthesis and simulation.
./designs/src/swerv/swerv_wrapper.sv2v.v:75: ERROR: Found non-synthesizable event list!

This seems to be related to the sensitivity list of the always@ block

  always @(posedge clk or N0) begin
    if(N0) begin
      dout[0] <= 1'b0;
    end else if(1'b1) begin
      dout[0] <= din[0];
    end 
  end

I am not sure if this is an issue with the original verilog file, however synthesis works in DC.
I have observed this issue on another design that passed with always_at_redux_opt performed.

swerv.tar.gz

Extremely long lines in generated verilog can cause yosys to crash

Extremely long lines in generated verilog can cause yosys to crash.

1. Executing Verilog-2005 frontend: ./designs/src/ariane/ariane.sv2v.v
Parsing Verilog input from `./designs/src/ariane/ariane.sv2v.v' to AST representation.
input buffer overflow, can't enlarge buffer because scanner uses REJECT

See attached files from sv2v. Simply breaking up the super long lines resolved ths.
Co-allating the original verilog files can be a bit challenging so hoping the elab.v works as a starting point
ariane.tar.gz

always@ reduction fails in swerv design

The always@ reduction fails in swerv design with the following error

INFO: Performing wire/reg declartion optimizations.
INFO: Performing always@ reduction optimizations.
Traceback (most recent call last):
  File "/net/trenton/x/ajayi/projects/OpenROAD/alpha-release/bsg_sv2v/scripts/py/bsg_elab_to_rtl.py", line 103, in <module>
    ast_always_at_redux_opt_inplace( ast )
  File "/net/trenton/x/ajayi/projects/OpenROAD/alpha-release/bsg_sv2v/scripts/py/bsg_ast_always_at_redux_opt_inplace.py", line 82, in ast_always_at_redux_opt_inplace
    ast_always_at_redux_opt_inplace(c)
  File "/net/trenton/x/ajayi/projects/OpenROAD/alpha-release/bsg_sv2v/scripts/py/bsg_ast_always_at_redux_opt_inplace.py", line 82, in ast_always_at_redux_opt_inplace
    ast_always_at_redux_opt_inplace(c)
  File "/net/trenton/x/ajayi/projects/OpenROAD/alpha-release/bsg_sv2v/scripts/py/bsg_ast_always_at_redux_opt_inplace.py", line 53, in ast_always_at_redux_opt_inplace
    if a.sens_list == always_blocks[bot_index].sens_list:
  File "/afs/eecs.umich.edu/cadre/software/anaconda3-2018.12/lib/python3.7/site-packages/pyverilog-1.1.3-py3.7.egg/pyverilog/vparser/ast.py", line 46, in __eq__
    if c != other_children[i]: return False
IndexError: tuple index out of range

Applying -no_always_at_redux_opt makes it generate.

swerv.tar.gz

error out earlier

When there is a parsing error, e.g.,

*** Presto compilation terminated with 1 errors. ***

the tool does not stop immediately, but runs everything else, so you are forced to scroll back and try to hunt for the error in the output.

Missing module top

After some digging, I think I found the issue why module top is not appearing. Take "bsg_cache.v" for example

  1. The main design module, bsg_cache, is missing in the elab.v file
  2. Tracing it back, it turns out that the renaming portion in the DC Synthesis run is not renaming the design module back to 'bsg_cache', thus in the elab.v file, there is no module named bsg_cache
  3. This means that the top module wrapper will never occur because there is no bsg_cache to wrap

Temporary solution that worked for me so far:
in bsg_sv2v/scripts/py/run_dc.tcl, I replaced the Rename portion of the code with the following code (taken from the bsg_target_design.dc.read_design.tcl from bsg_ppa_regression):

### Rename and set the real top-level design

# Check if the design name is found in the collection of designs. If not, then
# it either doesn't exist or it has been renamed (from parameters)
if { [sizeof_collection [get_designs -quiet ${DESIGN_NAME}]] == 0 } {

  set designs [get_designs -quiet -filter "@hdl_template == ${DESIGN_NAME}"]
  
  if { [sizeof_collection $designs] > 1 } {
    puts "BSG-Error: Toplevel design has multiple instances post-elaboration. This"
    puts "usually indicates that there are multiple parameterizations of the design."
    puts "This flow does not support different parameterizations of the top-level"
    puts "compile target, consider using a wrapper to uniqify the hierarchy for each"
    puts "parameter."
    exit -1
  }
  
  rename_design ${designs} ${DESIGN_NAME}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.