Skip to content

Commit 277a906

Browse files
committed
saw-central/Yosys: Support "$_BUF_" cell type in yosys import.
Fixes #2828.
1 parent ac8c52b commit 277a906

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

saw-central/src/SAWCentral/Yosys/Cell.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ primCellToMap sc c args =
300300
-- "$concat" -> _
301301
CellTypeDff -> pure Nothing
302302
CellTypeFf -> pure Nothing
303+
CellTypeBUF ->
304+
do res <- input "A"
305+
output res
303306
CellTypeUnsupportedPrimitive _ -> pure Nothing
304307
CellTypeUserType _ -> pure Nothing
305308
where

saw-central/src/SAWCentral/Yosys/IR.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ textToPrimitiveCellType = Map.fromList
135135
, ("$bmux" , CellTypeBmux)
136136
, ("$dff" , CellTypeDff)
137137
, ("$ff" , CellTypeFf)
138+
, ("$_BUF_" , CellTypeBUF)
138139
]
139140

140141
-- | Mapping from primitive cell types to textual representation
@@ -183,6 +184,7 @@ data CellType
183184
| CellTypeBmux
184185
| CellTypeDff
185186
| CellTypeFf
187+
| CellTypeBUF
186188
| CellTypeUnsupportedPrimitive Text
187189
| CellTypeUserType Text
188190
deriving (Eq, Ord)

0 commit comments

Comments
 (0)