question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for asynchronously-resettable registers

See original GitHub issue

FIRRTL is currently only capable of emitting registers with synchronous reset. This is often OK, but sometimes an asynchronous reset is desirable (e.g., see our recent discussion at ucb-bar/rocket-chip#190, as well as previous discussion from a variety of users). Ultimately, the designer should have the flexibility to choose which type of reset to instantiate. (See this classic discussion of the issue for more detail.)

Asynchronously-resettable flip-flops are a common verilog design idiom and are well-supported by EDA tools. ucb-bar/chisel#549 has a good writeup of the desired feature; I’ve copied and cleaned up the code example here for convenience. The option to select the reset polarity would also be nice.

always @(posedge clk or posedge reset) begin
  if (reset) begin //async-resettable flops
    flop1 <= FLOP1_RESET_VALUE;
    flop2 <= FLOP2_RESET_VALUE;
  end else // D -> Q state updates for async-resettable flops
    flop1 <= flop1_next;
    flop2 <= flop2_next;
  end
end

always @(posedge clk) begin
  if (reset) begin //sync-resettable flops
    flopA <= FLOPA_RESET_VALUE;
    flopB <= FLOPB_RESET_VALUE;
  end else begin // D -> Q state updates for sync-resettable flops and flops with no reset
    flopA <= flopA_next;
    flopB <= flopB_next;
    flopC <= flopC_next; // flopC has no sync or async reset
  end
end

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
janboeyecommented, Mar 6, 2018

@azidar Why this feature is low priority? If we want to use Chisel in ASIC chip, this is a must-have feature. In this stage, is there any workaround for this? Thanks a lot!

1reaction
azidarcommented, Nov 27, 2018

The low priority tag was determined by user interest - if there is more significant interest, then we can certainly make it a high priority.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support for asynchronously-resettable registers #219 - GitHub
FIRRTL is currently only capable of emitting registers with synchronous reset. This is often OK, but sometimes an asynchronous reset is ...
Read more >
Synchronous vs. Asynchronous Registries
A synchronous registry allows you to register and make changes to domain names in 'real time'. The server responds to client requests ...
Read more >
2.3.1.2. Using Asynchronous Resets - Intel
Unlike the synchronous reset, the asynchronous reset is not inserted in the datapath, and does not negatively impact the data arrival times between...
Read more >
Information on asynchronous reset registers and synchronous ...
Hello: I need to know how to obtain a list of flip-flops that are initialized on synchronous reset (both the edges synchronized, ...
Read more >
Data Register with both Sync and Async Set/Reset - SIMPLIS
The Data Register with both Sync and Async Set/Reset models a clocked data register with a load (enable) input. The clock edge for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found