apl-cornell / chiselflow Goto Github PK
View Code? Open in Web Editor NEWChisel3 modified to support information flow types.
Chisel3 modified to support information flow types.
Add a sub project which can be used to supply some demonstrations.
Also add a README.md for running these and explaining how IFC is enforced.
Currently you have to label the outer "Flipped" itself rather than its contents (which may be an Input), it would be nicer for Flipped objects to pick up a label from the innermost non-flipped object by default.
Currently the Chisel test suite does not pass at all for mismatched syntax and other reasons. Only code with appropriate labels actually passes the chisel compilation phase.
We need to update the test suite and add unit tests for examples that actually use the IFC label features extensively.
Issue description:
We use Decoupled
object to create handshake interface. For example, val test = Decoupled(UInt(128.W))
produces a 128-bit output with valid/ready interface. In secure chisel extension, the API is apply(gen: T, rdyl: Label = UnknownLabel, vall: Label = UnknownLabel)
to specify labels. In the API, only ready
and valid
signals are explicitly labeled, and the bits
should be implicitly labeled with data type gen
. But the compiler does not work as expected, the bits
is not labeled in the generated firrtl.
Example code:
class Test extends Module {
val io = IO(new Bundle {
val msg_o = Decoupled(UInt(128.W, bot), bot, bot)
})
}
Error message: [declaration io, with bad field bits in internal record msg_o : {ready : {L, H}, valid : {L, H}, bits : {, }}] does not have a declared label
.
Opinion:
File secure-chisel3/src/main/scala/chisel3/util/Decoupled.scala
defines the interface:
val ready = Input(Bool(), rdyl)
val valid = Output(Bool(), vall)
val bits = Output(gen.chiselCloneType)
In the definition, bits
inherits the data type from gen
, but I think chiselCloneType
method does not inherits the label information. Possible solution is val bits = Output(gen.chiselCloneType, gen.lbl_)
?
At least in 1 instance, the generated firrtl has the wrong declaration for a label.
In the attached case, the InsnLookup module has the wrong label on its output. It should be taken from the other output wires (out_conf and out_int).
Instead, in the generated firrtl it uses the instantiation of InsnLookup (named icache) for the confidentiality.
debug.zip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.