Skip to content

Commit 1519e5c

Browse files
committed
Use logic everywhere, instead of bit
1 parent d3e8681 commit 1519e5c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/sail_sv_backend/jib_sv.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ module Make (Config : CONFIG) = struct
145145
let simple_type str = (str, None)
146146

147147
let rec sv_ctyp = function
148-
| CT_bool -> simple_type "bit"
148+
| CT_bool -> simple_type "logic"
149149
| CT_bit -> simple_type "logic"
150150
| CT_fbits width -> ksprintf simple_type "logic [%d:0]" (width - 1)
151151
| CT_sbits max_width ->

src/sail_sv_backend/sail_plugin_sv.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ let verilog_target _ default_sail_dir out_opt ast effect_info env =
422422
in
423423

424424
let exception_vars =
425-
string "bit sail_reached_unreachable;" ^^ hardline ^^ string "bit sail_have_exception;" ^^ hardline
425+
string "logic sail_reached_unreachable;" ^^ hardline ^^ string "logic sail_have_exception;" ^^ hardline
426426
^^ (if !opt_nostrings then string "sail_unit" else string "string")
427427
^^ space ^^ string "sail_throw_location;" ^^ twice hardline
428428
in
@@ -471,7 +471,7 @@ let verilog_target _ default_sail_dir out_opt ast effect_info env =
471471
let fun_body = concat (List.init slots fun_body_slot) ^^ string "sail_reached_unreachable = 1;" in
472472
let slot_ranges = string ("[" ^ string_of_int slots ^ "]") in
473473
( sv_fundef_with ctx real_name arg_nms arg_typs ret_ty fun_body ^^ twice hardline,
474-
separate space [string "output"; string "bit"; invoke_flag ^^ slot_ranges]
474+
separate space [string "output"; string "logic"; invoke_flag ^^ slot_ranges]
475475
:: separate space [string "input"; string (fst (sv_ctyp ret_ty)); result ^^ slot_ranges]
476476
:: List.mapi (fun i typ -> separate space [string "output"; string (fst (sv_ctyp typ)); arg_out i ^^ slot_ranges]) arg_typs,
477477
List.init slots (fun s -> invoke_flag ^^ slot_index s ^^ string " = 0;")

0 commit comments

Comments
 (0)