firrtl | Flexible Intermediate Representation for RTL | Parser library

 by   chipsalliance Scala Version: v1.5.6 License: Apache-2.0

kandi X-RAY | firrtl Summary

kandi X-RAY | firrtl Summary

firrtl is a Scala library typically used in Utilities, Parser applications. firrtl has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Firrtl is an intermediate representation (IR) for digital circuits designed as a platform for writing circuit-level transformations. This repository consists of a collection of transformations (written in Scala) which simplify, verify, transform, or emit their input circuit. A Firrtl compiler is constructed by chaining together these transformations, then writing the final circuit to a file. For a detailed description of Firrtl's intermediate representation, see the document "Specification of the Firrtl Language" located in spec/spec.pdf.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              firrtl has a low active ecosystem.
              It has 620 star(s) with 170 fork(s). There are 62 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 174 open issues and 483 have been closed. On average issues are closed in 120 days. There are 106 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of firrtl is v1.5.6

            kandi-Quality Quality

              firrtl has 0 bugs and 0 code smells.

            kandi-Security Security

              firrtl has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              firrtl code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              firrtl is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              firrtl releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 62008 lines of code, 4355 functions and 420 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of firrtl
            Get all kandi verified functions for this library.

            firrtl Key Features

            No Key Features are available at this moment for firrtl.

            firrtl Examples and Code Snippets

            No Code Snippets are available at this moment for firrtl.

            Community Discussions

            QUESTION

            False "Combinational loop detected"
            Asked 2022-Mar-21 at 23:50

            I'm getting a wrong "CombLoopException" when passing a complex Record (Bundle based on key-value pairs) as UInt and converting the UInt back to the Record by using asUInt() and asTypeOf(...).

            When connecting the two Records directly without the UInt conversion step, there is no CombLoopException. I've spent several days trying to solve/reproduce the issue. This is why I am quite sure there should be no CombLoopException.

            Unfortunately, there is no small code snippet I could provide to reproduce the error, as I'm working on a custom modification of the Rocket Chip Generator and the problem only occurs on a complex modification of a Bundle.

            My question: How do I use the "--no-check-comb-loops" option to avoid the CombLoopException? Is there a way to add this option in the build.sbt?

            I'd also like to give a detailed description on this particular case if wanted in order to help fixing this rare issue: Disable FIRRTL pass that checks for combinational loops

            ...

            ANSWER

            Answered 2022-Mar-21 at 23:50

            It obviously depends on your specific code but I would still suggest trying to avoid creating the false combinational loop. It is likely true that it is a false loop, but tools like Verilator will likely struggle with it as well.

            That being said, you can disable the check by passing --no-check-comb-loops to the FIRRTL step of compilation (also known as the Verilog-generation step). In rocket-chip, it depends on which simulation directory you're doing, but in vsim it is here, in emulator it is here.

            Source https://stackoverflow.com/questions/71565366

            QUESTION

            Chisel: fail to generate verilog while writing a simple combinational logic
            Asked 2021-Nov-23 at 20:54

            I want to implement operation of rotate left shift.

            My chisel code :

            ...

            ANSWER

            Answered 2021-Nov-23 at 20:54

            You are currently using the old way to generate Verilog with the execute function. Replace your object in the test.scala by:

            Source https://stackoverflow.com/questions/70029349

            QUESTION

            Reference is not fully initialized
            Asked 2021-Jun-24 at 17:19

            I have a module like below:

            ...

            ANSWER

            Answered 2021-Jun-24 at 17:19

            The documentation linked in the other answer mentions this but I want to highlight a piece:

            The only caveat is if you are passing something of type Data as a “generator” parameter, in which case you should make it a private val.

            This is due to the fact that if you make a class parameter a val, it becomes a public field of the class. The hardware fields of a Bundle are defined to be "the public fields of the class of type Data". Thus, val OperandType is a field of the class, it would be the same as writing:

            Source https://stackoverflow.com/questions/68108528

            QUESTION

            generate register delay for simulation in chisel
            Asked 2021-May-10 at 17:51

            When I am using Verilog, I would like to define a register like this:

            ...

            ANSWER

            Answered 2021-May-10 at 17:51

            You cannot do this in Chisel. Chisel only supports a small, synthesizable subset of Verilog targeting synchronous, digital design. An important part of the ethos of Chisel is that simulation matches synthesis (you're simulating what you're taping out). While I totally see the use case in clearer waveforms, delays do so much more than that and aren't really appropriate for what Chisel is trying to accomplish.

            It would be nice if waveform viewers themselves provided visual cues to help make this more clear rather than forcing the user to resort to delay tricks.

            Source https://stackoverflow.com/questions/67428738

            QUESTION

            Chisel: How to change module parameters from command line?
            Asked 2021-Feb-02 at 13:29

            I have many modules with multiple parameters. Take as a toy example a modified version of the GCD in the template:

            ...

            ANSWER

            Answered 2021-Jan-27 at 23:25

            Good Question. I think you are you have pretty much everything right. I don't usually find that I need the command line to alter my tests, my development cycle usually is just poking values in the test params directly running. I use intelliJ which seems to make that easy (but may only work for my habits and the scale of projects I work on).

            But I would like to offer you a suggestions that will get you away from ExecutionOptions style as that is going away fast.

            In my example code below I offer basically two files here in line, in the first there a few library like tools that use the modern annotation idioms and, I believe, minimize boiler plate. They rely on stringy matching but that is fixable. In the second, is your GCD, GCDSpec, slightly modified to pull out the params a bit differently. At the bottom of the second is some very minimal boiler plate that allows you to get the command line access you want.

            Good luck, I hope this is mostly self explanatory.

            First file:

            Source https://stackoverflow.com/questions/65921833

            QUESTION

            Chisel/FIRRTL DefnameDifferentPortsException
            Asked 2020-Oct-21 at 08:01

            I recently updated the Chisel version of a big project of mine from 3.1.1 to 3.4.0; however, I am getting a bunch of firrtl.passes.CheckHighFormLike$DefnameDifferentPortsException:

            ...

            ANSWER

            Answered 2020-Oct-20 at 14:29

            This check is supposed to disallow impossible situations when referring to a specific BlackBox. Namely, the following must be true:

            • If the BlackBox has no parameters, then all ports must have the same name, same width, and be in the same order
            • If the BlackBox has parameters, then all ports must have the same name and be in the same order (but may have different widths)

            It sounds like either your example is producing BlackBoxes that violate the latter condition (since your BlackBoxes have parameters) or this has exposed a bug in that FIRRTL compiler check.

            The actual Verilog module is never checked and can't cause any problems here.

            Could you update your question to provide the FIRRTL IR that is producing these errors? Specifically, what does the FIRRTL IR for XilinxSimpleDualPortNoChangeBRAM and XilinxSimpleDualPortNoChangeBRAM_1 look like? This should be in a file like "Foo.fir". Alternatively, you can do something like:

            Source https://stackoverflow.com/questions/64440617

            QUESTION

            Chisel: getting signal name in final Verilog
            Asked 2020-Oct-14 at 18:05

            I'd like to automate as much as possible the instantiation of an ILA directly from the Chisel code. This means instantiating a module that looks like this:

            ...

            ANSWER

            Answered 2020-Oct-14 at 18:05

            I'd like to provide a more complete example, but I wanted to make sure to at least write something up. This also needs to be fleshed out as a proper example/tutorial on the website.

            FIRRTL has robust support for tracking names of signals across built-in and custom transformations. This is a case where the infrastructure is all there, but it's very much a power user API. In short, you can create FIRRTL Annotations that will track Targets. You can then emit custom metadata files or use the normal FIRRTL annotation file (try the CLI option -foaf / --output-annotation-file).

            An example FIRRTL Annotation that has will emit a custom metadata file at the end of compilation:

            Source https://stackoverflow.com/questions/64349930

            QUESTION

            How to freely assign values to vec type variables in chisel?
            Asked 2020-Oct-08 at 17:25

            I defined some vec variables.

            ...

            ANSWER

            Answered 2020-Oct-08 at 17:25

            I think the problem is that the firrtl compiler cannot be sure that every element of test0 has been initialized to something. I have filled out your examples, with values supplied and a couple of stylistic changes to this.

            Source https://stackoverflow.com/questions/64265326

            QUESTION

            How to convert a deprecated low Firrtl Transform to the Dependency API
            Asked 2020-Sep-29 at 18:24

            I am updating a Firrtl transform that looks like this

            ...

            ANSWER

            Answered 2020-Sep-29 at 18:24

            Many thanks to the Chisel team. It seems the answer is to do the conversion like this.

            Source https://stackoverflow.com/questions/64108921

            QUESTION

            IP block generation/testing when using diplomacy. Possible to give dummy node?
            Asked 2020-Sep-21 at 23:35

            I've been studying rocket-chip for utilizing diplomacy and I have a decent grasp on the overall structure of how diplomacy works. (I don't understand it totally, but well enough to create some examples on my own). I would like to develop some IP in which the main objective is to have a regmap through the use of a *RegisterRouter.

            If I use/modify one of the RegisterNodeExamples from rocket-chip, I get the following:

            ...

            ANSWER

            Answered 2020-Sep-21 at 23:35

            Just to have an answer, I ended up using a combination of what myself and Jack Koenig went back and forth on.

            If time permits I'll see if there is a way to make a "template" or LazyModule wrapper that does this for testing purposes (for each of the main protocols) and submit it to the Chisel repo.

            Source https://stackoverflow.com/questions/63909300

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install firrtl

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/chipsalliance/firrtl.git

          • CLI

            gh repo clone chipsalliance/firrtl

          • sshUrl

            git@github.com:chipsalliance/firrtl.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Parser Libraries

            marked

            by markedjs

            swc

            by swc-project

            es6tutorial

            by ruanyf

            PHP-Parser

            by nikic

            Try Top Libraries by chipsalliance

            chisel

            by chipsallianceScala

            chisel3

            by chipsallianceScala

            rocket-chip

            by chipsallianceScala

            verible

            by chipsallianceC++

            riscv-dv

            by chipsalliancePython