2026-06-22 01:08:39 +02:00
|
|
|
library(test) {
|
2026-06-22 01:12:09 +02:00
|
|
|
/* D-type latch with reset and preset */
|
|
|
|
|
cell (dlatchn) {
|
2026-06-22 01:08:39 +02:00
|
|
|
area : 6;
|
2026-06-22 01:12:09 +02:00
|
|
|
latch("IQ", "IQN") {
|
|
|
|
|
data_in : "D";
|
|
|
|
|
enable : "!ENA";
|
2026-06-22 01:08:39 +02:00
|
|
|
}
|
|
|
|
|
pin(D) {
|
|
|
|
|
direction : input;
|
|
|
|
|
}
|
2026-06-22 01:12:09 +02:00
|
|
|
pin(ENA) {
|
2026-06-22 01:08:39 +02:00
|
|
|
direction : input;
|
2026-06-22 01:12:09 +02:00
|
|
|
clock : true;
|
2026-06-22 01:08:39 +02:00
|
|
|
}
|
|
|
|
|
pin(Q) {
|
|
|
|
|
direction: output;
|
|
|
|
|
function : "IQ";
|
|
|
|
|
}
|
|
|
|
|
pin(QN) {
|
|
|
|
|
direction: output;
|
|
|
|
|
function : "IQN";
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-06-22 01:12:09 +02:00
|
|
|
cell (dlatchsr) {
|
2026-06-22 01:08:39 +02:00
|
|
|
area : 6;
|
2026-06-22 01:12:09 +02:00
|
|
|
latch("IQ", "IQN") {
|
|
|
|
|
data_in : "D";
|
|
|
|
|
enable : "ENA";
|
|
|
|
|
clear : "CLEAR";
|
|
|
|
|
preset : "PRESET";
|
2026-06-22 01:08:39 +02:00
|
|
|
clear_preset_var1 : L;
|
|
|
|
|
clear_preset_var2 : L;
|
|
|
|
|
}
|
|
|
|
|
pin(D) {
|
|
|
|
|
direction : input;
|
|
|
|
|
}
|
2026-06-22 01:12:09 +02:00
|
|
|
pin(ENA) {
|
2026-06-22 01:08:39 +02:00
|
|
|
direction : input;
|
2026-06-22 01:12:09 +02:00
|
|
|
clock : true;
|
2026-06-22 01:08:39 +02:00
|
|
|
}
|
|
|
|
|
pin(CLEAR) {
|
|
|
|
|
direction : input;
|
|
|
|
|
}
|
|
|
|
|
pin(PRESET) {
|
|
|
|
|
direction : input;
|
|
|
|
|
}
|
|
|
|
|
pin(Q) {
|
|
|
|
|
direction: output;
|
|
|
|
|
function : "IQ";
|
|
|
|
|
}
|
|
|
|
|
pin(QN) {
|
|
|
|
|
direction: output;
|
|
|
|
|
function : "IQN";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|