umarcor on keep-compiling
ci: use the built-in '--keep-co… (compare)
umarcor on cosim
cosim/dpi-ffi: add 'vhdpi_ghdl.… cosim/dpi-ffi: add VHDPI_Test (compare)
umarcor on cosim
WIP setenv (compare)
umarcor on main
cosim/dpi-ffi/ghdl-vffi/test: a… (compare)
umarcor on cosim
umarcor on main
WIP envvars (compare)
umarcor on cosim
WIP envvars (compare)
umarcor on master
umarcor on main
umarcor on cosim
umarcor on master
cosim/dpi-ffi: create subdir 'g… cosim/dpi-ffi: fix compilation … cosim/dpi-ffi/ghd-vffi: use VUn… and 2 more (compare)
umarcor on cosim
ci: add workflow CoSim cosim/dpi-ffi: add README (compare)
umarcor on cosim
ci: add workflow CoSim cosim/dpi-ffi: add README (compare)
umarcor on cosim
cosim/dpi-ffi: create subdir 'g… cosim/dpi-ffi: fix compilation … cosim/dpi-ffi/ghd-vffi: use VUn… and 2 more (compare)
umarcor on top-subtype
umarcor on master
2008: ad tb_top_generic_subtype cosim: add ref to aguinet/drago… (compare)
umarcor on top-subtype
2008: ad tb_top_generic_subtype (compare)
umarcor on top-subtype
2008: ad tb_top_generic_subtype (compare)
umarcor on top-subtype
2008: ad tb_top_generic_subtype (compare)
umarcor on style
@JimLewis Actually, LRM says this:
It is an error if no such actual is specified for a given formal generic type (either because the formal generic is unassociated or because the actual is open).
So I guess they cannot be left unconnected (and maybe its worth filing a ticket)
When you define this:
type line1 is access string;
type line2 is access string;
you get 2 incompatible types.
designated_type
generic, because the access_type
holds all needed information.
P2
in the LRM.
architecture A of E is
package I2 is new P2
generic map (
access_type => line
);
begin
end architecture;
type t;
is legal as a forward type declaration, but it requires the complete type at a later point in the same unit
package P2 is
generic (
type designated_subtype
);
type fred is access designated_subtype ;
type tricky_pt is new protected pt
generic map (
....
);
It's a (new) type, and no subtype, because instances of PT are not compatible to each other.
either create a library file first, then run ghdl-yosys-plugin on that:
ghdl analyze file1.vhdl file2.vhdl subdir/file3.vhdl
ghdl elaborate topentity
yosys -m ghdl -p 'ghdl topentity'
or run ghdl-yosys-plugin directly on the files, without creating a library file:
yosys -m ghdl -p 'ghdl file1.vhdl file2.vhdl subdir/file3.vhdl -e topentity'
in general, the yosys ghdl
command is equivalent to invoking the ghdl binary as ghdl --synth
.
Actually, there is another solution in-between:
ghdl analyze file1.vhdl file2.vhdl subdir/file3.vhdl
yosys -m ghdl -p 'ghdl -e topentity'
That is useful if the files are analysed in a library different to the top-level, but you don't care about the logical lib name of the top-level:
ghdl analyze --work=designlib file1.vhdl file2.vhdl subdir/file3.vhdl
yosys -m ghdl -p 'ghdl toplevel.vhd -e topentity'
# Synthesis
yosys -m ghdl -p 'ghdl --work=designlib file1.vhdl file2.vhdl subdir/file3.vhdl --work=anyother toplevel.vhd -e topentity'
# Analysis and Elaboration
ghdl -a \
--work=designlib file1.vhdl file2.vhdl subdir/file3.vhdl \
--work=anyother toplevel.vhd testbench.vhd \
-e topentity
# elab-run
ghdl elab-run \
--work=designlib file1.vhdl file2.vhdl subdir/file3.vhdl \
--work=anyother toplevel.vhd testbench.vhd \
-e topentity \
--wave=mywave.ghw
entity test is
end test;
architecture rtl of test is
function f return real is
function f return real is
begin
return 3.14;
end f;
begin
return f;
end f;
begin
process
begin
report real'image(f);
wait;
end process;
end rtl;
function f return real;
function f return integer is
begin
return integer(real'(f));
end f;
I was on the team that created VHDL. I was probably the first person to actually write VHDL, since my task on the team was to write VHDL and see how usable it was.