<sxpert>
whitequark: in particular, I'm not sure I should use "=" or "<="
<tnt>
Use <= in clocked always clock, use = in always(*) blocks.
<tnt>
always @(posedge clk & enable) Nope ... always(@posedge clk) or always (*) ... never use anything else.
<tnt>
Arf, I never used 'task' ever ... I stick to the simple stuff I know works reliably.
<tnt>
no idea if it's good or not.
<tnt>
Why did you declare all those things as PARAMETER ? do you expect to change them during instanciation ?
<sxpert>
tnt: is there a way to declare things as constants ?
<tnt>
localparam I think is what should be used.
<tnt>
(non modifiable parameter ... no idea why it's called that way, but whatever)
<sxpert>
localparam it is... thanks for that one (proceeds to change)
<sxpert>
tnt: as I understand it, tasks are similar to functions, and allow to not have unwiedly case statements
<sxpert>
but I may be mistaken
m4ssi has joined ##openfpga
<azonenberg>
the main difference is that a task can take time to execute in sim
<azonenberg>
a function is always instantaneous
<azonenberg>
tnt: and there are a few situations where i've used "=" in a clocked block in order to express some complex calculation using temporary variables
<azonenberg>
But it's rare, and if you do it you should have a good reason and clearly comment why
<tnt>
azonenberg: sure, every rule has exceptions, but for beginners I would advise against it because it' so easy to shoot yourself in the foot :p
<tnt>
wrt to task/large case ... I feel that if you have to do that, you're not really describing the hardware you want built, you describe the behavior you want and hope the synthesis comes up with a good hardware for it, which in my experience never yields anything close to good for non-trivial stuff.
<sxpert>
azonenberg: so I should be using functions. ok
<sxpert>
also will modify to get rid of "="
rohitksingh_wor1 has quit [Read error: Connection reset by peer]
<sxpert>
hmmm one can only use "=" in functions
xdeller has quit [Read error: Connection reset by peer]
xdeller_ has joined ##openfpga
s_frit has quit [Remote host closed the connection]
s_frit has joined ##openfpga
somlo has joined ##openfpga
rohitksingh has joined ##openfpga
OmniMancer has quit [Quit: Leaving.]
jevinskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitksingh has quit [Ping timeout: 272 seconds]
X-Scale has joined ##openfpga
rohitksingh has joined ##openfpga
genii has joined ##openfpga
somlo has quit [Ping timeout: 268 seconds]
somlo has joined ##openfpga
<_whitenotifier-c>
[whitequark/Glasgow] marcan tagged 8ae10d2 as revC0 https://git.io/fhSNU