Giter VIP home page Giter VIP logo

Comments (15)

seldridge avatar seldridge commented on August 22, 2024 1

I think we can add support for this with an annotation pretty easily now that Stage/Phase is in. An API would then be an annotation or CLI option string that you add that uses that string when calling Verilator.

from chisel-testers.

stevenmburns avatar stevenmburns commented on August 22, 2024 1

There is another option that we use as well (at least for VCS) for deleting existing commands on the command line, for example, if you want to allow X as initial values in your simulation:

vcsCommandEdits = """s/\+vcs\+initreg\+random //"""

from chisel-testers.

stevenmburns avatar stevenmburns commented on August 22, 2024

This seems good to me. No big rush on getting it done. We have workarounds now.

from chisel-testers.

stevenmburns avatar stevenmburns commented on August 22, 2024

Any progress on this one.

from chisel-testers.

chick avatar chick commented on August 22, 2024

@stevenmburns this has been languishing, but I will get to it in the next couple of days. Can you provide an example of the the two use cases described?

from chisel-testers.

chick avatar chick commented on August 22, 2024

Partially resolved by PR #161, remaining issue about how to remove flags that are hard coded right now:

In the long run, maybe we need a way to modify this Seq of flags. Not all of these are clearly always desired.
In particular “-debug_pp” (record all internal signals in the vpd file) and “+v2k” (if we are using “-sverilog” instead) come to mind.
Can we just expose it to the TesterOptions and then allow a user to manipulate it in scala?

val vcsFlags = Seq("-full64",
  "-quiet",
  "-timescale=1ns/1ps",
  "-debug_pp",
  s"-Mdir=$topModule.csrc",
  "+v2k", "+vpi",
  "+vcs+lic+wait",
  "+vcs+initreg+random",
  "+define+CLOCK_PERIOD=1",
  "-P", "vpi.tab",
  "-cpp", "g++", "-O2", "-LDFLAGS", "-lstdc++",
  "-CFLAGS", "\"%s\"".format(ccFlags mkString " ")) ++
  moreVcsFlags ++
  blackBoxVerilogList

from chisel-testers.

stevenmburns avatar stevenmburns commented on August 22, 2024

My idea to override +vcs+initreg+random with +vcs+initreg+x didn't work. (The "+x" suffix is not valid in newer versions of VCS.)

So I'll need something more near term. I'll just remove the +vcs+initreg+random from our build and add it when we need it. You should probably implement either exposing the vcsFlags sequence or your RegEx-based removal idea.

from chisel-testers.

chick avatar chick commented on August 22, 2024

@stevenmburns: I have a new PR #163 that gives ad hoc editing capabilities to the vcs command. Please check it out when you have a chance. It's a bit hacky but I felt I was getting bogged down trying to figure out a more general way of exposing the vcs command construction to the options manager system

from chisel-testers.

kammoh avatar kammoh commented on August 22, 2024

I need to use custom command line options for the verilator backend. Is there any way to do this other than forking iotesters?!

from chisel-testers.

kammoh avatar kammoh commented on August 22, 2024

Alright, I just found out that moreVcsFlags works for Verilator too!
But I think there's room for improvement on the documentation side as well as for the naming of the option.

from chisel-testers.

kammoh avatar kammoh commented on August 22, 2024

Is there a way to use annotations (instead of ExecutionOptionsManager) with the Driver API?

from chisel-testers.

seldridge avatar seldridge commented on August 22, 2024

It's in Chisel and FIRRTL, but not yet in all other projects (we're working on it). Summarily, execution options are deprecated in 3.2/1.2 in favor of annotations and you should be able to control everything that way.

from chisel-testers.

chick avatar chick commented on August 22, 2024

At least in the master versions, Stage/Phases/Annotations is also in both treadle and testers2 and both provide additional feedback as to how to implement and pass annotations around. The TreadleRepl is probably a good thing to look at.

from chisel-testers.

chick avatar chick commented on August 22, 2024

I am wonder what the status of this issue is though. It looks to me like it has been addressed with the various PR's noted within. If there is something left to do here it might be a good idea to make a new more focused issue. Can this be closed?

from chisel-testers.

stevenmburns avatar stevenmburns commented on August 22, 2024

Yes, we can close it.

from chisel-testers.

Related Issues (20)

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.