Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VHDL recommendation: Entity names #677

Closed
wmurbina opened this issue Nov 24, 2023 · 3 comments
Closed

VHDL recommendation: Entity names #677

wmurbina opened this issue Nov 24, 2023 · 3 comments

Comments

@wmurbina
Copy link

When I try to export to VHDL a circuit the entity should have the same name as the circuit.

For example:

instead of main it should be Half_adder.

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

-- Half_adder
entity main is
port (
A: in std_logic;
B: in std_logic;
S: out std_logic;
C: out std_logic);
end main;

architecture Behavioral of main is
begin
S <= (A XOR B);
C <= (A AND B);
end Behavioral;

@flandreas
Copy link
Owner

@wmurbina Can you please explain why this is an issue for you? Does "main" conflict with something else, or what is your use case?

@wmurbina
Copy link
Author

wmurbina commented Nov 24, 2023

The problem is when the generated code is to be used in other software such as Xilinx's Vivado.

It will be difficult to identify when you have several files.
image

Another thing that I have identified that is confusing is the names given to the entities when exporting in VHDL, these are too long. It could be improved if you put the name of the subcircuit (or name of the block of the standard library).

I attach an example of what I am trying to explain.
image

@flandreas
Copy link
Owner

Ok, I see, thank you!

The current naming scheme based on "main" and UUIDs for the subcircuits was straight-forward, and it ensured unique names. But I see your point.

So I will change it so that the entities are named like the circuits, adjusting them as needed to comply with VHDL naming syntax rules and uniqueness.

@flandreas flandreas added this to the 1.10.0 milestone Nov 24, 2023
@flandreas flandreas changed the title VHDL recommendation. VHDL recommendation: Entity names Nov 24, 2023
@flandreas flandreas added the done label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants