Commit graph

96 commits

Author SHA1 Message Date
Jacob Lifshay ff269e5def
add utility functions on HdlOption, inspired by Option's API 2024-09-20 18:49:12 -07:00
Jacob Lifshay df55a514e4
add support for incomplete_wire -- a wire that you can supply the type of later 2024-09-20 18:46:56 -07:00
Jacob Lifshay ff94dda922
support #[hdl] on functions -- enables #[hdl] usage in function body 2024-09-20 18:42:24 -07:00
Jacob Lifshay a8c804ef4a
some final cleanups
All checks were successful
/ test (push) Successful in 5m43s
2024-09-19 23:52:32 -07:00
Jacob Lifshay 2d293ae87b
#[hdl] match works! 2024-09-19 23:51:54 -07:00
Jacob Lifshay 9887d70f41
fix handling of const and size type generics when generating Index impls
All checks were successful
/ test (push) Successful in 5m1s
2024-09-19 18:45:04 -07:00
Jacob Lifshay 2c1afd1cd6
const generics on hdl_module work!
All checks were successful
/ test (push) Successful in 4m54s
2024-09-17 15:39:23 -07:00
Jacob Lifshay 76ea7f82c3
WIP adding const generics
Some checks failed
/ test (push) Failing after 1m3s
2024-09-16 16:47:10 -07:00
Jacob Lifshay 5835b995a9
WIP: use HdlOption[the_type_var] or UInt[123 + n] for creating types
All checks were successful
/ test (push) Successful in 4m56s
2024-08-21 22:27:21 -07:00
Jacob Lifshay cd99dbc849
properly bound with StaticValue or StaticType<MaskType: StaticType>
All checks were successful
/ test (push) Successful in 14m38s
2024-07-30 20:25:37 -07:00
Jacob Lifshay 2dce478d48
rename FixedType->StaticType, fixed_type()->static_type(), hdl(fixed_type)->hdl(static), IsFixedLen->IsStaticLen 2024-07-30 20:16:00 -07:00
Jacob Lifshay be025c14ca
split up util.rs
All checks were successful
/ test (push) Successful in 14m43s
2024-07-28 22:08:51 -07:00
Jacob Lifshay 14a9c23697
change raw url to a link 2024-07-28 22:08:22 -07:00
Jacob Lifshay 305805d237
fix wire example to actually be about wires, not registers
All checks were successful
/ test (push) Successful in 14m43s
2024-07-26 14:15:34 -07:00
Jacob Lifshay b33566841d
make #[hdl_module] support functions with generic parameters
All checks were successful
/ test (push) Successful in 14m40s
2024-07-25 22:20:38 -07:00
Jacob Lifshay ef4b3b4081
make [T; N]: ToExpr for any N instead of a fixed list 2024-07-25 22:08:28 -07:00
Jacob Lifshay 7963f0a5cd
add Iterator<Item = Pair<T, P>> helpers 2024-07-25 22:07:23 -07:00
Jacob Lifshay c94a437686
add cli option to set verilog dialect
All checks were successful
/ test (push) Successful in 14m49s
2024-07-24 23:13:56 -07:00
Jacob Lifshay f582013c1b
add cli for compiling to verilog
All checks were successful
/ test (push) Successful in 15m23s
2024-07-23 23:49:39 -07:00
Jacob Lifshay 0611044941
Fix typo
All checks were successful
/ test (push) Successful in 14m36s
Fixes: #1
2024-07-22 15:58:05 -07:00
Jacob Lifshay 180ecad017
fix doctests to use Expr<UInt<1>> instead of bool for example conditions
All checks were successful
/ test (push) Successful in 14m40s
2024-07-22 02:20:06 -07:00
Jacob Lifshay 0edf380c79
refactor fayalite::cli to expose subcommands
Some checks failed
/ test (push) Failing after 13m29s
2024-07-22 01:41:45 -07:00
Jacob Lifshay 37d03cec33
change #[hdl] if to only accept Expr<T> instead of accepting bool, this prevents using == by accident 2024-07-22 00:52:48 -07:00
Jacob Lifshay 79031ccf88
fix blinky example to use cmp_eq instead of == 2024-07-22 00:52:29 -07:00
Jacob Lifshay 5707ede2ae
support IntCmp with primitive integer types 2024-07-22 00:50:53 -07:00
Jacob Lifshay 422330d195
fix doc test
All checks were successful
/ test (push) Successful in 15m15s
2024-07-21 21:09:31 -07:00
Jacob Lifshay a191ece9a5
add blinky example
Some checks failed
/ test (push) Failing after 7m59s
2024-07-21 20:48:43 -07:00
Jacob Lifshay 23a77368b3
add beginnings of simple CLI 2024-07-21 20:47:52 -07:00
Jacob Lifshay 8080cc7b5c
add utility functions for getting smallest integer type that fits a range/value 2024-07-21 20:46:23 -07:00
Jacob Lifshay bdfa18e11d
add IntTypeTrait::literal utility function 2024-07-21 20:45:36 -07:00
Jacob Lifshay 8ca0cd56c4
fix warning 2024-07-21 20:44:29 -07:00
Jacob Lifshay 1809fccb45
clarify docs some more
All checks were successful
/ test (push) Successful in 14m27s
2024-07-21 17:38:54 -07:00
Jacob Lifshay 5cf638c74a
fix broken doc tests
All checks were successful
/ test (push) Successful in 14m25s
2024-07-19 17:14:09 -07:00
Jacob Lifshay dba883e300
split <int>.cast() into cast_as_type and cast to be more useful when casting to deduced fixed types 2024-07-19 17:12:29 -07:00
Jacob Lifshay af95bb2f58
write docs for #[hdl] expressions
All checks were successful
/ test (push) Successful in 8m53s
2024-07-18 00:51:01 -07:00
Jacob Lifshay 153dc261e3
WIP writing docs -- refactor #[hdl] docs to be a module tree for easier navigation
All checks were successful
/ test (push) Successful in 9m51s
2024-07-18 00:13:28 -07:00
Jacob Lifshay 190e440b35
WIP adding docs
All checks were successful
/ test (push) Successful in 9m6s
2024-07-16 19:46:52 -07:00
Jacob Lifshay 86827def91
rename ClockDomain fields to clk and rst for consistency 2024-07-16 19:46:08 -07:00
Jacob Lifshay 63fd038729
correctly handle hdl byte literal suffixes 2024-07-16 19:45:12 -07:00
Jacob Lifshay c2e5ea8e89
implement #[hdl] [a; N] -- an array repeat expression 2024-07-16 17:19:17 -07:00
Jacob Lifshay d610858144
move Value derive macro re-export to same place as Value trait
All checks were successful
/ test (push) Successful in 8m55s
2024-07-16 16:51:54 -07:00
Jacob Lifshay 6a5f1b8af1
prep for eventual publishing
All checks were successful
/ test (push) Successful in 9m43s
2024-07-11 22:39:00 -07:00
Jacob Lifshay 109dda21ce
remove unused paste dependency 2024-07-11 22:36:10 -07:00
Jacob Lifshay 8bd7fcfa27
reformat messy code that rustfmt doesn't format
All checks were successful
/ test (push) Successful in 9m17s
2024-07-10 23:34:41 -07:00
Jacob Lifshay 28f32d7d1a
work around rustdoc bug https://github.com/rust-lang/rust/issues/127593 2024-07-10 23:00:05 -07:00
Jacob Lifshay 0b958e7852
initial public commit 2024-06-10 23:09:13 -07:00