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

Support enum type checking lint checks #726

Open
veripoolbot opened this issue Mar 22, 2014 · 1 comment
Open

Support enum type checking lint checks #726

veripoolbot opened this issue Mar 22, 2014 · 1 comment

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Mar 22, 2014


Author Name: Jeff Bush (@jbush001)
Original Redmine Issue: 726 from https://www.veripool.org
Original Date: 2014-03-22


Pretty much any signal with the proper width can be assigned to an enum.

	typedef enum logic[1:0] {
		FOO_A,
		FOO_B,
		FOO_C,
		FOO_D
	} foo_t;
	
	foo_t foo;
	
	always_comb
	begin
		foo = 2'd2;
	end

There should be an error if it is assigned without an explicit cast.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Mar 25, 2014


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-03-25T00:27:28Z


Yes, Verilator is weak to almost non-existent in type checks. Needs work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.