Commit Graph

4817 Commits

Author SHA1 Message Date
Wilson Snyder
899de9a282 Add --lib-create, similar to --protect-lib but without protections (#3200). 2021-11-14 09:39:31 -05:00
Wilson Snyder
4b593f8eb3 Commentary 2021-11-14 09:01:03 -05:00
Wilson Snyder
28b6e79cf7 Tests: Rename t_lib_prot tests in prep for new options. 2021-11-14 08:58:04 -05:00
Wilson Snyder
fe5822ba54 Commentary 2021-11-13 15:01:27 -05:00
Wilson Snyder
c496649c49 Internals: Remove unused DfaGraph code. 2021-11-13 14:48:21 -05:00
Wilson Snyder
37e3c6da70 Internals: Add more const. No functional change intended. 2021-11-13 13:50:44 -05:00
Wilson Snyder
4cb5c1e1db Internals: More const. No functional change. 2021-11-13 11:38:12 -05:00
Wilson Snyder
b7a7504ba5 Internals: More obvious debug filename. 2021-11-13 11:35:03 -05:00
Wilson Snyder
3a5cbd5b67 Internals: Untabify some embedded tabs. 2021-11-13 10:46:25 -05:00
Wilson Snyder
27883b52d6 Internals: Add const 2021-11-13 10:42:26 -05:00
Wilson Snyder
b95ee84343 Commentary 2021-11-13 10:41:00 -05:00
Geza Lore
185e5d8f42 Make 'bit', 'logic' and 'time' types unsigned by default
IEEE 1800-2017 6.11.3 says these types are unsigned. Until now these
types were treated as not having a signedness (NOSIGN), and nodes having
these types were later resolved by V3Width to be unsigned. This is a bit
problematic when creating nodes of these types after V3Width. Treating
these types as unsigned from the get go is fine, and actually improves
generated code slightly.
2021-11-09 21:54:21 +00:00
Geza Lore
987ce927eb Remove unused code. No functional change. 2021-11-09 19:46:19 +00:00
Yutetsu TAKATSUKASA
b08c694cd6
Fix wrong bit op tree optimization (#3185)
* Add a test to reproduce bug3182. Run the same HDL with -Oo to confirm the result is same.

* Hopefully fix #3182. The result can be 0 only when polarity is true (no AstNot is found during traversal).
2021-11-06 12:31:50 +09:00
Geza Lore
e69a8e838d
Improve memory usage of V3Partition. Only performance change intended. (#3192) 2021-11-05 22:08:54 -04:00
Wilson Snyder
61612582e6 Improve memory usage of V3Partition. Only performance change intended. 2021-11-04 07:39:28 -04:00
Wilson Snyder
8b00939f0c Improve performance of V3Scoreboard. Only performance change intended. 2021-11-03 22:16:18 -04:00
Wilson Snyder
da5644211f Improve memory usage of V3Partition. Only performance change intended. 2021-11-03 22:01:40 -04:00
Wilson Snyder
c1d7bfa617 Internals: Skip some asserts in fastpath partitioning. 2021-11-03 19:19:23 -04:00
Wilson Snyder
c26ce25cea Internals: Add more const. No functional change. 2021-11-03 17:49:19 -04:00
Wilson Snyder
758264dc77 Fix nested generate if genblk naming (#3189). 2021-11-01 08:59:00 -04:00
Wilson Snyder
304697d133 Commentary 2021-11-01 08:57:43 -04:00
Teng Huang
fdbf465eda
Fix array method names with parens (#3181) (#3183) 2021-10-26 12:20:45 -04:00
Wilson Snyder
90102d9867 Commentary 2021-10-25 21:02:02 -04:00
Wilson Snyder
a1bb471aca Internals: Iterate sentree in clocker to avoid confusing iterateChildren. No functional change intended. 2021-10-25 20:19:49 -04:00
Wilson Snyder
4ef37d9411 Commentary 2021-10-25 19:53:41 -04:00
Yutetsu TAKATSUKASA
f3b10df454
Skip merging assign statements if a variable is marked split_var to fix #3177 (#3179)
* add tests to reproduce #3177.

Any random test circuits can be added to t_split_var_4.v later because it uses CRC to check the result while
t_split_var_0.v has just barrel shifters.

* Fix #3177. Don't merge assign statements if a variable is marked split_var.
2021-10-25 20:56:59 +09:00
Geza Lore
f5a226a183 Partial clean up of V3Order. No functional change intended.
This is a partial cleanup of V3Order with the aim of increasing clarity:
- Split the initial OrderGraph building and the actual ordering process
into separate classes (OrderVisitor -> OrderBuildVisitor + OrderProcess)
- Remove all the historical cruft from the graph building phase (now in
OrderBuildVisitor), and add more assertions for assumptions.
- Change the dot styling of OrderGraph to use shapes and more easily
distinguishable colors.
- Expand vague comments, remove incorrect comments, and add more.
- Replace some old code with cleaner C++11 constructs.
- Move code about a bit so logically connected sections are closer to
each other, scope some definitions where they are used rather than file
scope.
- The actual ordering process (now in OrderProcess) is still largely
unchanged.

The generated code is identical to before (within the limits of the
exiting non-determinism).
2021-10-24 16:49:05 +01:00
Geza Lore
5515eed0b6 Make AstTopScope accessible from AstNetlist
AstTopScope is a singleton node and making it accessible without a
traversal simplifies some code and decouple some other.
2021-10-24 13:00:29 +01:00
Geza Lore
381c87a1eb Remove VN_CAST_CONST and VN_AS_CONST.
The _CONST suffix on these macros is only lexical notation, pointer
constness can be preserved by overloading the underlying
implementations appropriately. Given that the compiler will catch
invalid const usage (trying to assign a non-const pointer to a const
pointer variable, etc.), and that the declarations of symbols should
make their constness obvious, I see no reason to keep the _CONST
flavours.
2021-10-24 11:43:48 +01:00
github action
20e896ec21 Apply 'make format' 2021-10-22 18:51:57 +00:00
Geza Lore
70603bb752 Add static assertions for unnecessary VN_IS/VN_AS/VN_CAST
Fail at compile time if the result of these macros can be statically
determined (i.e.: they aways succeed or always fail). Remove unnecessary
casts discovered. No functional change.
2021-10-22 19:39:24 +01:00
Geza Lore
7cb6dc664e Generate YYSTYPE members with astgen
In preparation for strengthening Ast type system. No functional change.
2021-10-22 19:27:32 +01:00
Geza Lore
dae9fa5053 Use VN_AS wherever possible and obvious. No functional change. 2021-10-22 14:06:00 +01:00
Wilson Snyder
aa1a0b0f13 Tests: Fix numactl on WSL2 2021-10-19 21:24:22 -04:00
Wilson Snyder
371bf01957 Tests: Fix numactl on WSL2 2021-10-19 21:21:52 -04:00
Wilson Snyder
ef7759a522 Commentary re: WSL2 2021-10-19 20:34:13 -04:00
Wilson Snyder
0ef9087f89 Commentary 2021-10-17 14:51:50 -04:00
Wilson Snyder
00059987a1 devel release 2021-10-17 14:47:19 -04:00
Wilson Snyder
8f090176a6 Version bump 2021-10-17 14:36:23 -04:00
Wilson Snyder
43e8263d1f Commentary 2021-10-17 14:35:34 -04:00
Geza Lore
ac622f9db8 Introduce VN_AS for downcasting to known AstNode subtype.
VN_AS should be used over VN_CAST in code where the author knows up
front (i.e.: statically) what the true type of the node is. This has
multiple benefits over VN_CAST:
- In the debug build: Asserts node type is as expected
- In the optimized build: It is faster as no superfluous type test
- And (I would argue most importantly) it documents intent in the code

No current instances of VN_CAST changed in this patch
2021-10-16 23:52:31 +01:00
Wilson Snyder
749a66b7a2 Add assertion on mix of combo/posedge (#3170) 2021-10-16 18:14:32 -04:00
Geza Lore
fc80ace6e4 Reduce size of astgen generated implementation boilerplate.
Rely on C++ templates instead for simplicity. No functional change.
2021-10-16 20:15:51 +01:00
Wilson Snyder
b8f6b262e4 Fix false EOFNEWLINE warning when DOS carriage returns present (#3171). 2021-10-13 21:21:51 -04:00
Wilson Snyder
b64e89f7ed Fix calling new with arguments in same class (#3166). 2021-10-12 21:22:59 -04:00
Wilson Snyder
c3bec344a4 Fix missing install of vl_file_copy/vl_hier_graph (#3165). 2021-10-12 20:20:45 -04:00
Iru Cai
9731ec76e3
Fix $urandom_range when the range is 0 ... UINT_MAX (#3161) 2021-10-11 06:45:19 -06:00
Matthew Ballance
a9646cf45c
Fix constructor-parameter argument comma-separation in C++ (#3162) 2021-10-09 17:19:31 -06:00
Wilson Snyder
5f597dd9fc Tests: Improve internal coverage holes 2021-10-05 22:02:37 -04:00