a VHDL question on code debug(many thanks)

Status
Not open for further replies.

jackimoon

Newbie level 2
Joined
Dec 24, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,291
a question on VHDL code(many thanks)

if I identify "mod" as this:
"port(mod:in std_logic_vector(3 downto 0) );"
then how can I use this sentence:
" if(s<mod)then
s<=s+1;co<='0';
elsif(s=mod)then
co<='1';s<="0000";
end if;"

(I'm a novice ,thanks for any help~~~~)
 
Last edited:

I'm not sure what your question is. That looks like a perfectly valid snippet of code there.

Are you asking about the entity/architecture constructs?
 

"mod" is a reserved word in VHDL, so I am not surprised if you get into trouble when you use it as a port or signal name.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…