Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SpecialWires package, similar to CReg but for Wire and other Wires with multiple ports #1

Merged
merged 3 commits into from
Jul 31, 2020

Conversation

JonasAlaif
Copy link
Contributor

Should this be in the BlueUtils dir?

@JonasAlaif
Copy link
Contributor Author

Also add Copyright header since all of the other files have it? Should I just copy from one of the other packages here?

@JonasAlaif JonasAlaif requested a review from gameboo July 16, 2020 16:05
Copy link
Member

@gameboo gameboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be in the BlueUtils dir?

I was wondering about that... maybe it makes sense to put it there.... It might be that there is a case to reorganise this a bit... I don't think I am too bothered with the file living straight up in the root for the time being, and we can wonder about this later....

Also add Copyright header since all of the other files have it? Should I just copy from one of the other packages here?

Need to ask Simon about the things that need mentioning in there. Most likely it will be the same header, but could you check with him?


List #(Wire #(a_bits)) wires <- replicateM (n, wire_module);
let bit_wires = map (compose (pack, readReg), wires);
a_bits op_read = unpack (fold (op_b, bit_wires));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDK to what extent this matters in practice, but since we are using the tree style reduction here, I think we require operations where associativity does not matter (and what about commutativity? We probably don't care?). All in all, I'd just mention that tree of operations in the comments.

@gameboo
Copy link
Member

gameboo commented Jul 17, 2020

I was thinking about your claim of "similar to CReg" which I was a bit puzzled by as concurrent regs allow for writes within a cycle to be read in the same cycle on a later interface, and overshadowed by later writes in the cycle etc etc. That got me thinking, and basically I remembered this: https://github.com/CTSRD-CHERI/BlueStuff/blob/master/BlueUtils/SimpleUtils.bsv#L146. I suggest you also pull that guy out of where it currently live and into the SpecialWires package. What do you think?

@JonasAlaif JonasAlaif changed the title Add SpecialWires package, similar to CReg but for Wire Add SpecialWires package, similar to CReg but for Wire and other Wires with multiple ports Jul 17, 2020
@gameboo gameboo merged commit 0b9d07b into master Jul 31, 2020
@JonasAlaif JonasAlaif deleted the scratch-jf613-special-wires branch August 6, 2020 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants