GithubHelp home page GithubHelp logo

substate-tech / ambel Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 2.49 MB

AMBEL is a Chisel library for generating AMBA components

License: Apache License 2.0

Scala 68.98% Verilog 30.12% Shell 0.77% JavaScript 0.13%
chisel3 amba apb fpga verilog

ambel's People

Contributors

actions-user avatar richmorj avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ekiwi

ambel's Issues

Add capability to generate RDL

Apb2CSTrgt register description JSON schema is a subset of RDL; RDL could be generated to allow integration with third-party/commercial tools.

Bug - increase Simple example coverage

Describe the bug
The Simple example is not intact, line coverage is <100%.

To Reproduce
Steps to reproduce the behavior:
Run test with Verilator

Expected behavior
Simple example needs a test which invokes PSLVERR response.

Desktop (please complete the following information):

  • OS: Any

Additional context
Add any other context about the problem here.

Extend Bundle generation to complete Wrapper Module generation

You can already generate nice Bundles IO named after the JSON specified bit-fields. These can be used to wrap Apb2CSTrgt Modules connecting the anonymous, numbered MixedVec IO to the named Bundle IO in order. But why not just generate the whole Wrapper Module with the Bundles.

Add Apb2CSTrgt unit test for W1C bits

There is currently no unit test for the Apb2CSTrgt module's W1C bit-field mode. A test should be written, parameterizing the module with a JSON register description describing some registers with W1C bit-fields. The parameterized instance should be wrapped in a module with named inputs corresponding to the W1C bit-fields. The test should drive the inputs corresponding to the W1C register bit-fields with single-cycle pulses to set the register bits to '1'. The register bit-fields should be read via the APB2 target to check that the bit(s) were set to '1'. The register bit-fields which have been set to '1' should be written to with a '1' to clear them to '0'. The same register bit-fields should be read again to check that they have indeed been cleared. Setting and clearing individual bits of each field should be tested as well as set/clear of multiple bits simultaneously. A negative test should be performed to check that writing '0' to the register bit-fields has no side-effect (i.e. does not actually clear the corresponding bit to '0', but does nothing).

Implement pProt

From AMBA APB Protocol Specification
pProt[0]

  • LOW indicates normal access
  • HIGH indicates privileged access

pProt[1]

  • LOW indicates a secure access
  • HIGH indicates a non-secure access

The JSON register description schema should be extended to allow a register to be marked as either privileged only or secure only or both. If the corresponding mode was not indicated on pProt[1:0] then the register would be neither writable nor readable (would read zero) and pSlvErr would be signaled to the initiator.

There is no requirement to do anything in particular with pProt[2] which is intended to hint whether the access is an instruction access or a data access.

Add CI...

Initially running all tests with Treadle then migrating to Verilator to allow coverage report generation and PR gating if coverage drops.

Add more examples

Ideally a very simple example of Apb2CSTrgt for each register mode, with tests. Ultimately a realistic fully fledged example, perhaps driving and connected to status some simple external logic (e.g. a simple timer or counter).

Unit test is required for the specified implementation of pStrb

The Apb2CSTrgt module supports pStrb as described in Apb2CSTrgt.scala:

_

"if a bit field straddles two or more byte lanes and not ALL the corresponding bits of pStrb are set then the bit field is not written (at all) and pSlvErr is signalled. In other words, partial writes to bitfields are not supported; either the whole bit field is written, when ALL corresponding pStrb bits are set, or the bit field is not written at all. Writing to a register with NONE of the pStrb bits corresponding to a given bit field set is OK and is NOT an error condition. This is a design decision."

_

None of the above is currently exhaustively tested.

Add Apb2CSTrgt unit test for RO bits

There is currently no test targeting the read-only bit-field mode supported by Apb2CSTrgt. The test should instantiate Apb2CSTrgt with a JSON register description describing some registers with RO bit fields. The test should include a wrapper module with named inputs for the RO bit-fields and drive those inputs with known values, and check that the same values are readable via the APB2 target on the corresponding bit-fields. It should also perform a negative check, that the registers are not writable.

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.