Nick Gasson
eef1c968dc
Add message that casex cannot be translated
...
...with the correct behavior. It would be possible to
just translate it as a regular VHDL case statement (as
it was before this patch). But the behavior is not
correct as VHDL only does the equivalent of case-equality
in case statements and this can be confusing when debugging
the output. An alternative might be to emit a warning rather
than an error.
2008-08-08 20:09:40 +01:00
Nick Gasson
0985158090
Handle %% in $display
2008-08-08 20:07:22 +01:00
Nick Gasson
090ae5fa56
Catch case where signal with same name in task and module
...
This fixes task3.14C
2008-08-08 19:47:20 +01:00
Nick Gasson
13cb81f4bb
Add task signals to containing architecture
...
This is necessary to support the in-line expansion of tasks
2008-08-08 19:31:45 +01:00
Nick Gasson
bb0efda526
Make make_safe_name case insensitive
2008-08-07 17:58:42 +01:00
Nick Gasson
e4d0a92d7c
Division and modulus operators
2008-08-07 14:18:26 +01:00
Nick Gasson
28d782e13c
Remove redundant verilog_support.vhd file
2008-08-07 13:10:53 +01:00
Nick Gasson
6f5f700cb9
Very minimal implementation of tasks
...
This expands the task in-line inside the process to avoid
problems with global variables (VHDL processes cannot
reference globals)
2008-08-07 10:54:39 +01:00
Nick Gasson
4cbec1c817
Add XNOR binary operand
2008-08-06 11:18:01 +01:00
Nick Gasson
f86f454956
Apply the last patch to if/case statements too
...
This further cleans up the output by removing more
useless `wait for 0ns' statements.
2008-08-05 11:09:51 +01:00
Nick Gasson
e01e038cf9
Avoid generating useless `wait for 0ns' statements
...
If the final statement in a process is a non-blocking
assignment then there is no point adding a `wait for 0ns'
after it since it will be immediately followed by another
wait. This case is suprisingly common, so this patch helps
generate much cleaner output without breaking the cases
where the 0ns wait is actually required (e.g. to implement
non-blocking assignment properly).
2008-08-05 11:02:36 +01:00
Nick Gasson
c849dfeec4
Add XNOR logic device
2008-08-05 10:45:01 +01:00
Nick Gasson
8d7b03576c
Correctly implement unary XNOR
...
Forgot to negate the output.
2008-08-05 10:38:43 +01:00
Nick Gasson
72019959a8
Translate some ternary expressions to if statements
...
This re-implements some earlier functionality where
ternary expressions on an assignment RHS are translated
to an if statement.
2008-08-03 15:47:32 +01:00
Nick Gasson
9565ea1034
Add some whitespace above component instantiations
2008-08-03 14:50:13 +01:00
Nick Gasson
49a2693357
Add file / line number information to functions
2008-08-03 14:46:57 +01:00
Nick Gasson
10a5ca199d
Add file / line number comments to instantiations
2008-08-03 14:38:08 +01:00
Nick Gasson
c2f622327f
Use ivl_scope_def_* for definition file/line numbers
2008-08-03 14:34:41 +01:00
Nick Gasson
0e2628a3fb
Minimal implementation of IVL_LPM_MUX
...
This handles the (common) case of the select being only
1 bit wide. Implemented as a concurrent assignment with
a `when' clause.
2008-08-03 12:46:50 +01:00
Nick Gasson
45dfa28dba
Remember signal pin a nexus was attached to
...
Also modify nexus_to_var_ref to set the correct array
offset when the signal is an array (the offset comes
from the pin).
2008-08-03 11:41:26 +01:00
Nick Gasson
c8cbac58f5
Add forward declarations for functions
...
This patch adds a forward declaration for every user funciton.
This fixes VHDL compile problems if a function calls another
before it has been declared.
2008-08-03 10:50:31 +01:00
Nick Gasson
c1b5424ca6
Implement assignment with multiple lvals
...
Multiple lvals are implemented by first assigning the complete
RHS to a temporary, and then assigning each lval in turn as
bit-selects of the temporary
2008-08-02 18:40:24 +01:00
Nick Gasson
c706c94e38
Generate a vhdl_var_ref for every assignment lval
...
This completes the refactoring of make_assignment
necessary to implement multiple lvals.
2008-08-02 18:20:18 +01:00
Nick Gasson
fad8abee34
Start refactoring make_assignment for multiple lvals
...
This patch lifts the RHS generating code out of the
lval-specific code and sticks a loop around the lvals.
2008-08-02 16:38:44 +01:00
Nick Gasson
9448c5939c
Always user Ternary_* support functions for ternary assignments
...
Previously the code generator expanded ternary assignments to
and `if' statement. This patch replaces that with a single assignment
and a call to a Ternary_* support function. This will make it
much easier to support multiple lvals later.
2008-08-02 15:46:36 +01:00
Nick Gasson
752a90dc2f
Insert blank line before VHDL process in output
2008-08-02 10:45:38 +01:00
Nick Gasson
a60216ec15
Use ivl_process_* functions for file/line number information
2008-08-02 10:44:03 +01:00
Nick Gasson
5d0df8d880
Change format of line file/line numbers
2008-08-02 10:42:00 +01:00
Nick Gasson
bb80b432e6
Add comments file/line number comments
...
Added to entities, architectures, and processes
2008-08-01 21:21:42 +01:00
Nick Gasson
e0834f7f38
Add NAND and NOR logic devices
2008-08-01 17:46:04 +01:00
Nick Gasson
a26d91557b
Add binary NAND and NOR operators
2008-08-01 17:42:26 +01:00
Nick Gasson
3f73c9bb54
Make sure argument to unary - is signed
2008-08-01 16:35:47 +01:00
Nick Gasson
09f3eb4a36
Don't bother calling reduction function if argument is std_logic
2008-08-01 16:27:55 +01:00
Nick Gasson
d21277f1b9
Tidy up whitespace in output
2008-07-31 21:17:49 +01:00
Nick Gasson
7b0f675785
Add check for sequential UDPs
2008-07-31 21:08:59 +01:00
Nick Gasson
db339b8fc3
Stub for UDP logic devices
2008-07-31 20:59:20 +01:00
Nick Gasson
baa2363e85
Split logic device code into separate file
2008-07-30 10:13:08 +01:00
Nick Gasson
e5b8abfb23
Remove debugging output
2008-07-29 21:15:51 +01:00
Nick Gasson
9f6f711f8d
Remove unused variable
2008-07-29 21:08:50 +01:00
Nick Gasson
9a5b7bb0b0
Connect signals together if joined in a nexus
2008-07-29 21:03:00 +01:00
Nick Gasson
eaf1cc9120
Fix assertion failure with arrayed signals
2008-07-29 19:47:17 +01:00
Nick Gasson
3bcd42dc8f
Fix case where logic device has no valid output
2008-07-29 19:39:20 +01:00
Nick Gasson
744fbed783
Finish re-writing nexus code
2008-07-29 19:33:40 +01:00
Nick Gasson
c9454b346e
Fix module3.12B
2008-07-29 19:04:41 +01:00
Nick Gasson
5ec2c37e7e
Get functions working again
2008-07-29 15:29:49 +01:00
Nick Gasson
25602e487d
Comment
2008-07-29 15:12:51 +01:00
Nick Gasson
e037ffd952
Create temporaries for LPM outputs
2008-07-29 15:09:58 +01:00
Nick Gasson
48c1a7982c
Make seen_nexus private
2008-07-29 14:24:04 +01:00
Nick Gasson
a842b327c7
Generate constant drivers as concurrent assignments
2008-07-29 14:02:05 +01:00
Nick Gasson
f8034d69ef
Fix constants in nexuses
2008-07-29 13:30:54 +01:00