Nick Gasson
0348664512
Correctly determine VHDL type of LHS of part select
2008-07-07 16:35:39 +01:00
Nick Gasson
3987e0753d
Fix case where booleans are compared against vectors
2008-07-07 16:31:27 +01:00
Nick Gasson
6b73cc39a5
Add Active_High support func and fix LPM part select
2008-07-07 16:17:54 +01:00
Nick Gasson
b0de1a8d7e
Implement part select for LHS of assignment
2008-07-07 16:11:45 +01:00
Nick Gasson
37fe6e4219
Dummy implementation of IVL_LO_BUF*
2008-07-07 15:49:51 +01:00
Nick Gasson
89cdbf63be
Reduction LPM types
2008-07-07 15:45:20 +01:00
Nick Gasson
7f955cc070
Move the VHDL support package
2008-07-07 15:36:13 +01:00
Nick Gasson
4db5b9d7ed
Add unary OR/NOR
...
These are currently implemented with reference to an external
Reduce_OR function
2008-07-07 15:23:57 +01:00
Nick Gasson
dadd145d09
Add message for unsupported LPM nexus pointer
2008-07-07 15:04:28 +01:00
Nick Gasson
bdf5ee7ab7
Concat LPM
2008-07-07 14:48:57 +01:00
Nick Gasson
ebaa4c7d5d
Implement assignment to part select properly
...
Previously the base of the lval was ignored, this ensures
the correct assignment is generated.
2008-07-07 11:00:27 +01:00
Nick Gasson
c33600bcc3
Add concatenation operator
2008-07-06 18:21:34 +01:00
Nick Gasson
85d2cc78d6
Finish ternary operator expansion
2008-07-06 17:56:48 +01:00
Nick Gasson
18071562ba
Partially implement ternary expressions
...
This handles the case where the expression appears as the
right hand side of an assignment. The expression is converted
into a regular if statement.
2008-07-04 21:55:51 +01:00
Nick Gasson
5aeff6d47d
Merge blocking and non-blocking assignment code
2008-07-04 20:07:38 +01:00
Nick Gasson
a298b03735
Add bitwise OR
2008-07-04 12:05:49 +01:00
Nick Gasson
3d0a2b55ce
Avoid declaring same function multiple times
...
If it appears in multiple places in the hierarchy
2008-07-04 12:03:37 +01:00
Nick Gasson
19871efd5a
Fix bug where sensitivity might reference undefined signals
2008-07-04 11:58:33 +01:00
Nick Gasson
1410c339de
Make sure any calls to numeric_std Resize have correct type
...
The signed/unsigned-ness of an expression needs to be
preserved over any call to Resize. Also add a sanity
check to make sure non-vector types are not resized.
2008-07-04 11:36:11 +01:00
Nick Gasson
96d32b29c9
Translate logical expressions correctly.
...
For logical AND/OR in VHDL both operands must be of the
same type (Boolean)
2008-07-04 11:23:32 +01:00
Nick Gasson
88816e150a
Properly parenthesise unary operators
2008-07-04 11:17:24 +01:00
Nick Gasson
409fc4dc19
Check if case expression variable is already defined
...
Verilog_Case_Ex is used as a temporary to store the result of
any non-static case expression. This fixes a bug where it would
be declared multiple times if there were multiple case statements
in a block.
2008-07-04 11:15:34 +01:00
Nick Gasson
c54b36c902
Add logical AND operator
2008-07-04 11:10:20 +01:00
Nick Gasson
19cbab78b2
Tidy up code to generate default branch of case
2008-07-03 20:04:47 +01:00
Nick Gasson
1736cd9bc8
Fix uneccessarily complicated generated case statement
...
No need to generate separate case test variable if the
test in the VL source is a simple variable reference.
2008-07-03 16:27:36 +01:00
Nick Gasson
a5264e9995
Make sure all choices are covered in case statement
2008-07-03 16:17:56 +01:00
Nick Gasson
6868127ba3
Make sure case expression has the correct type
2008-07-03 16:14:17 +01:00
Nick Gasson
dbbadbc309
Make sure the renamed signal is used in the sensitivity list
2008-07-03 16:13:02 +01:00
Nick Gasson
fb08164cbc
List some more illegal VHDL names
2008-07-03 15:20:43 +01:00
Nick Gasson
7e999c5496
Fix continuous assignment of constants
...
E.g. in assign p = 1 the RHS signal in the generated LPM now
has a correct intial value (and it will never be written to
elsewhere)
2008-07-03 15:13:12 +01:00
Nick Gasson
4fac825457
Add PV part select type
2008-07-03 14:45:54 +01:00
Nick Gasson
35c66744db
Cleanup and remove debug output
2008-07-01 11:31:00 +01:00
Nick Gasson
930e04f6c7
Ensure port map expressions are globally static
2008-07-01 11:28:02 +01:00
Nick Gasson
37756b8d06
Avoid mapping a signal to itself
2008-07-01 11:13:02 +01:00
Nick Gasson
596c93ce7e
Rename instance if it has the same name as the type
2008-07-01 11:05:24 +01:00
Nick Gasson
edfae1abfb
PV LPM part select type
2008-07-01 11:02:49 +01:00
Nick Gasson
624943b3ca
Simplify port map generation code
2008-07-01 10:59:31 +01:00
Nick Gasson
ef89a760d6
Add vhdl_element::print method for debugging
2008-07-01 10:44:20 +01:00
Nick Gasson
050aa277ae
Make vhdl_element::emit a little more generic
2008-07-01 10:37:22 +01:00
Nick Gasson
f03dfb50ad
Refactor nexus_to_var_ref
2008-07-01 10:33:46 +01:00
Nick Gasson
6e8474f584
Fix bug where func had to be declared before use
2008-06-30 17:58:15 +01:00
Nick Gasson
4e73b1b133
Fix bug when resolving nexus to VHDL signal
2008-06-30 17:47:45 +01:00
Nick Gasson
e08e29c8b4
Add UFUNC LPM type
2008-06-30 16:35:29 +01:00
Nick Gasson
b82ca28190
Add XOR logic type and fix part select
2008-06-30 16:18:55 +01:00
Stephen Williams
e02d186946
Handle multiple passes of scope and defparam elaboration.
...
When generate schems and instance arrays are nested, it takes
multiple iterations of elaborate scope, defparams and evaluate
parameters before everything is worked out. Rework the work item
processing so that the loop elaborates scopes and runs defparams
in phases. The phases are needed so that we can tell when the
remaining defparams are orphaned.
2008-06-30 03:46:46 +02:00
Stephen Williams
d9b02657a7
Modules within generate schemes are not default roots.
...
Modules mentioned within generate schemes are not candidates for
defaults guesses at root modules. They are, obviously, used within
the generate schem.
2008-06-28 13:34:46 -05:00
Stephen Williams
d761a2273c
Run generate schemes after defparams.
...
We must run generate schemes after running defparams because the
defparams may define the results of the generate schemes. So put
the generate schemes for a module scope into elaborator work items.
2008-06-28 13:06:14 -05:00
Stephen Williams
e3d9cc30a8
Checkin some developer convenience scripts.
2008-06-28 09:51:42 -07:00
Stephen Williams
1ef7994ae2
Handle indexed defparams.
...
The l-value of a defparam assignment is a hierarchical name that may
include array selects to select scopes from module arrays. Therefore
it makes no sense to store parsed defparams in a map. Instead, they
should go into an ordered list. This also maked more sense because later
defparams *may* have the same name as a previous defparam, and will
override the previous defparam. So replace the map of parsed defparams
with a list of parsed defparams.
Also, as soon as the defparam expression is elaborated, the list entry
is no longer needed, so delete it. Save memory.
2008-06-28 09:30:09 -07:00
Nick Gasson
081f397460
Implement LPM part select
2008-06-27 14:58:03 +01:00