Latch cells¶
The cell types $_DLATCH_N_ and $_DLATCH_P_ represent d-type latches.
Verilog |
Cell Type |
|---|---|
|
|
|
The cell types $_DLATCH_[NP][NP][01]_ implement d-type latches with reset.
The values in the table for these cell types relate to the following Verilog
code template:
always @*
if (R == RST_LVL)
Q <= RST_VAL;
else if (E == EN_LVL)
Q <= D;
\(EnLvl\) |
\(RstLvl\) |
\(RstVal\) |
Cell Type |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The cell types $_DLATCHSR_[NP][NP][NP]_ implement d-type latches with set
and reset. The values in the table for these cell types relate to the following
Verilog code template:
always @*
if (R == RST_LVL)
Q <= 0;
else if (S == SET_LVL)
Q <= 1;
else if (E == EN_LVL)
Q <= D;
\(EnLvl\) |
\(SetLvl\) |
\(RstLvl\) |
Cell Type |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The cell types $_SR_[NP][NP]_ implement sr-type latches. The values in the
table for these cell types relate to the following Verilog code template:
always @*
if (R == RST_LVL)
Q <= 0;
else if (S == SET_LVL)
Q <= 1;
\(SetLvl\) |
\(RstLvl\) |
Cell Type |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
- yosys> help $_DLATCHSR_NNN_¶
A negative enable D-type latch with negative polarity set and negative polarity reset.
Truth table: E S R D | Q ---------+--- - - 0 - | 0 - 0 - - | 1 0 - - d | d - - - - | q- Simulation model (verilog)¶
3575module \$_DLATCHSR_NNN_ (E, S, R, D, Q); 3576 input E, S, R, D; 3577 output reg Q; 3578 always @* begin 3579 if (R == 0) 3580 Q <= 0; 3581 else if (S == 0) 3582 Q <= 1; 3583 else if (E == 0) 3584 Q <= D; 3585 end 3586endmodule
- yosys> help $_DLATCHSR_NNP_¶
A negative enable D-type latch with negative polarity set and positive polarity reset.
Truth table: E S R D | Q ---------+--- - - 1 - | 0 - 0 - - | 1 0 - - d | d - - - - | q- Simulation model (verilog)¶
3603module \$_DLATCHSR_NNP_ (E, S, R, D, Q); 3604 input E, S, R, D; 3605 output reg Q; 3606 always @* begin 3607 if (R == 1) 3608 Q <= 0; 3609 else if (S == 0) 3610 Q <= 1; 3611 else if (E == 0) 3612 Q <= D; 3613 end 3614endmodule
- yosys> help $_DLATCHSR_NPN_¶
A negative enable D-type latch with positive polarity set and negative polarity reset.
Truth table: E S R D | Q ---------+--- - - 0 - | 0 - 1 - - | 1 0 - - d | d - - - - | q- Simulation model (verilog)¶
3631module \$_DLATCHSR_NPN_ (E, S, R, D, Q); 3632 input E, S, R, D; 3633 output reg Q; 3634 always @* begin 3635 if (R == 0) 3636 Q <= 0; 3637 else if (S == 1) 3638 Q <= 1; 3639 else if (E == 0) 3640 Q <= D; 3641 end 3642endmodule
- yosys> help $_DLATCHSR_NPP_¶
A negative enable D-type latch with positive polarity set and positive polarity reset.
Truth table: E S R D | Q ---------+--- - - 1 - | 0 - 1 - - | 1 0 - - d | d - - - - | q- Simulation model (verilog)¶
3659module \$_DLATCHSR_NPP_ (E, S, R, D, Q); 3660 input E, S, R, D; 3661 output reg Q; 3662 always @* begin 3663 if (R == 1) 3664 Q <= 0; 3665 else if (S == 1) 3666 Q <= 1; 3667 else if (E == 0) 3668 Q <= D; 3669 end 3670endmodule
- yosys> help $_DLATCHSR_PNN_¶
A positive enable D-type latch with negative polarity set and negative polarity reset.
Truth table: E S R D | Q ---------+--- - - 0 - | 0 - 0 - - | 1 1 - - d | d - - - - | q- Simulation model (verilog)¶
3687module \$_DLATCHSR_PNN_ (E, S, R, D, Q); 3688 input E, S, R, D; 3689 output reg Q; 3690 always @* begin 3691 if (R == 0) 3692 Q <= 0; 3693 else if (S == 0) 3694 Q <= 1; 3695 else if (E == 1) 3696 Q <= D; 3697 end 3698endmodule
- yosys> help $_DLATCHSR_PNP_¶
A positive enable D-type latch with negative polarity set and positive polarity reset.
Truth table: E S R D | Q ---------+--- - - 1 - | 0 - 0 - - | 1 1 - - d | d - - - - | q- Simulation model (verilog)¶
3715module \$_DLATCHSR_PNP_ (E, S, R, D, Q); 3716 input E, S, R, D; 3717 output reg Q; 3718 always @* begin 3719 if (R == 1) 3720 Q <= 0; 3721 else if (S == 0) 3722 Q <= 1; 3723 else if (E == 1) 3724 Q <= D; 3725 end 3726endmodule
- yosys> help $_DLATCHSR_PPN_¶
A positive enable D-type latch with positive polarity set and negative polarity reset.
Truth table: E S R D | Q ---------+--- - - 0 - | 0 - 1 - - | 1 1 - - d | d - - - - | q- Simulation model (verilog)¶
3743module \$_DLATCHSR_PPN_ (E, S, R, D, Q); 3744 input E, S, R, D; 3745 output reg Q; 3746 always @* begin 3747 if (R == 0) 3748 Q <= 0; 3749 else if (S == 1) 3750 Q <= 1; 3751 else if (E == 1) 3752 Q <= D; 3753 end 3754endmodule
- yosys> help $_DLATCHSR_PPP_¶
A positive enable D-type latch with positive polarity set and positive polarity reset.
Truth table: E S R D | Q ---------+--- - - 1 - | 0 - 1 - - | 1 1 - - d | d - - - - | q- Simulation model (verilog)¶
3771module \$_DLATCHSR_PPP_ (E, S, R, D, Q); 3772 input E, S, R, D; 3773 output reg Q; 3774 always @* begin 3775 if (R == 1) 3776 Q <= 0; 3777 else if (S == 1) 3778 Q <= 1; 3779 else if (E == 1) 3780 Q <= D; 3781 end 3782endmodule
- yosys> help $_DLATCH_NN0_¶
A negative enable D-type latch with negative polarity reset.
Truth table: E R D | Q -------+--- - 0 - | 0 0 - d | d - - - | q- Simulation model (verilog)¶
3381module \$_DLATCH_NN0_ (E, R, D, Q); 3382 input E, R, D; 3383 output reg Q; 3384 always @* begin 3385 if (R == 0) 3386 Q <= 0; 3387 else if (E == 0) 3388 Q <= D; 3389 end 3390endmodule
- yosys> help $_DLATCH_NN1_¶
A negative enable D-type latch with negative polarity set.
Truth table: E R D | Q -------+--- - 0 - | 1 0 - d | d - - - | q- Simulation model (verilog)¶
3405module \$_DLATCH_NN1_ (E, R, D, Q); 3406 input E, R, D; 3407 output reg Q; 3408 always @* begin 3409 if (R == 0) 3410 Q <= 1; 3411 else if (E == 0) 3412 Q <= D; 3413 end 3414endmodule
- yosys> help $_DLATCH_NP0_¶
A negative enable D-type latch with positive polarity reset.
Truth table: E R D | Q -------+--- - 1 - | 0 0 - d | d - - - | q- Simulation model (verilog)¶
3429module \$_DLATCH_NP0_ (E, R, D, Q); 3430 input E, R, D; 3431 output reg Q; 3432 always @* begin 3433 if (R == 1) 3434 Q <= 0; 3435 else if (E == 0) 3436 Q <= D; 3437 end 3438endmodule
- yosys> help $_DLATCH_NP1_¶
A negative enable D-type latch with positive polarity set.
Truth table: E R D | Q -------+--- - 1 - | 1 0 - d | d - - - | q- Simulation model (verilog)¶
3453module \$_DLATCH_NP1_ (E, R, D, Q); 3454 input E, R, D; 3455 output reg Q; 3456 always @* begin 3457 if (R == 1) 3458 Q <= 1; 3459 else if (E == 0) 3460 Q <= D; 3461 end 3462endmodule
- yosys> help $_DLATCH_N_¶
A negative enable D-type latch.
Truth table: E D | Q -----+--- 0 d | d - - | q- Simulation model (verilog)¶
3338module \$_DLATCH_N_ (E, D, Q); 3339 input E, D; 3340 output reg Q; 3341 always @* begin 3342 if (E == 0) 3343 Q <= D; 3344 end 3345endmodule
- yosys> help $_DLATCH_PN0_¶
A positive enable D-type latch with negative polarity reset.
Truth table: E R D | Q -------+--- - 0 - | 0 1 - d | d - - - | q- Simulation model (verilog)¶
3477module \$_DLATCH_PN0_ (E, R, D, Q); 3478 input E, R, D; 3479 output reg Q; 3480 always @* begin 3481 if (R == 0) 3482 Q <= 0; 3483 else if (E == 1) 3484 Q <= D; 3485 end 3486endmodule
- yosys> help $_DLATCH_PN1_¶
A positive enable D-type latch with negative polarity set.
Truth table: E R D | Q -------+--- - 0 - | 1 1 - d | d - - - | q- Simulation model (verilog)¶
3501module \$_DLATCH_PN1_ (E, R, D, Q); 3502 input E, R, D; 3503 output reg Q; 3504 always @* begin 3505 if (R == 0) 3506 Q <= 1; 3507 else if (E == 1) 3508 Q <= D; 3509 end 3510endmodule
- yosys> help $_DLATCH_PP0_¶
A positive enable D-type latch with positive polarity reset.
Truth table: E R D | Q -------+--- - 1 - | 0 1 - d | d - - - | q- Simulation model (verilog)¶
3525module \$_DLATCH_PP0_ (E, R, D, Q); 3526 input E, R, D; 3527 output reg Q; 3528 always @* begin 3529 if (R == 1) 3530 Q <= 0; 3531 else if (E == 1) 3532 Q <= D; 3533 end 3534endmodule
- yosys> help $_DLATCH_PP1_¶
A positive enable D-type latch with positive polarity set.
Truth table: E R D | Q -------+--- - 1 - | 1 1 - d | d - - - | q- Simulation model (verilog)¶
3549module \$_DLATCH_PP1_ (E, R, D, Q); 3550 input E, R, D; 3551 output reg Q; 3552 always @* begin 3553 if (R == 1) 3554 Q <= 1; 3555 else if (E == 1) 3556 Q <= D; 3557 end 3558endmodule
- yosys> help $_DLATCH_P_¶
A positive enable D-type latch.
Truth table: E D | Q -----+--- 1 d | d - - | q- Simulation model (verilog)¶
3359module \$_DLATCH_P_ (E, D, Q); 3360 input E, D; 3361 output reg Q; 3362 always @* begin 3363 if (E == 1) 3364 Q <= D; 3365 end 3366endmodule
- yosys> help $_SR_NN_¶
A set-reset latch with negative polarity SET and negative polarity RESET.
Truth table: S R | Q -----+--- - 0 | 0 0 - | 1 - - | q- Simulation model (verilog)¶
497module \$_SR_NN_ (S, R, Q); 498 input S, R; 499 output reg Q; 500 always @* begin 501 if (R == 0) 502 Q <= 0; 503 else if (S == 0) 504 Q <= 1; 505 end 506endmodule
- yosys> help $_SR_NP_¶
A set-reset latch with negative polarity SET and positive polarity RESET.
Truth table: S R | Q -----+--- - 1 | 0 0 - | 1 - - | q- Simulation model (verilog)¶
521module \$_SR_NP_ (S, R, Q); 522 input S, R; 523 output reg Q; 524 always @* begin 525 if (R == 1) 526 Q <= 0; 527 else if (S == 0) 528 Q <= 1; 529 end 530endmodule
- yosys> help $_SR_PN_¶
A set-reset latch with positive polarity SET and negative polarity RESET.
Truth table: S R | Q -----+--- - 0 | 0 1 - | 1 - - | q- Simulation model (verilog)¶
545module \$_SR_PN_ (S, R, Q); 546 input S, R; 547 output reg Q; 548 always @* begin 549 if (R == 0) 550 Q <= 0; 551 else if (S == 1) 552 Q <= 1; 553 end 554endmodule
- yosys> help $_SR_PP_¶
A set-reset latch with positive polarity SET and positive polarity RESET.
Truth table: S R | Q -----+--- - 1 | 0 1 - | 1 - - | q- Simulation model (verilog)¶
569module \$_SR_PP_ (S, R, Q); 570 input S, R; 571 output reg Q; 572 always @* begin 573 if (R == 1) 574 Q <= 0; 575 else if (S == 1) 576 Q <= 1; 577 end 578endmodule