# HDL1039: A reset domain should not use both asynchronous and synchronous resets ## Summary ```{raw} html
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| MEDIUM | - | MEDIUM | Consistency | Conventional | 30min | synthesis, bug-finder, reset, linty-ultra |
Mixing both synchronous and asynchronous resets within the same reset domain can lead to several complications:
In conclusion, while there might be specific scenarios where using both reset strategies could seem advantageous, the combination generally introduces unnecessary complexity, timing ambiguities, and verification challenges. It's often better to choose one strategy that fits the design's requirements for all elements within a reset domain to maintain clarity, consistency, and reliability in the design.
architecture rtl of top is
begin
A: process (clk) is
begin
if rising_edge(clk) then
s1 <= '1';
if rst = '1' then -- Synchronous reset
s1 <= '0';
end if;
end if;
end process;
B: process(clk, rst) is
begin
if rst = '1' then -- Asynchronous reset
s2 <= '0';
elsif rising_edge(clk) then
s2 <= '1';
end if;
end process;
end architecture;
architecture rtl of top is
begin
A: process (clk) is
begin
if rising_edge(clk) then
s1 <= '1';
if rst = '1' then -- Synchronous reset
s1 <= '0';
end if;
end if;
end process;
B: process (clk) is
begin
if rising_edge(clk) then
s2 <= '1';
if rst = '1' then -- Synchronous reset
s2 <= '0';
end if;
end if;
end process;
end architecture;
```
## Parameters
No parameters.
```{raw} html
```