phanrahan / mantle

mantle library
Other
42 stars 10 forks source link

Add regfile enable interface #185

Closed leonardt closed 4 years ago

leonardt commented 4 years ago

CC @kavyasreedhar

Here's a proposal for the register file interface for enable, it basically adds a write method that takes an optional enable parameter. Here's an example:

        reg_file.write(io.write_addr, io.write_data, enable=io.write_enable)

I'm open to alternative syntaxes, but this should get you started and it's easy enough to change. Does this seem like it would work for your use case?

kavyasreedhar commented 4 years ago

This looks great, I think it should work for my use case, thanks! I think I might be also able to use what you've done here to extend this interface as necessary for other enables / ports.