Re: sharing blogs about"rising_edge vs clk'event"and "numeric_std vs std_logic_arith"
The numeric_std argument is actually more interesting when you research it a bit more. The highlights:
* in the 1990's, multiple companies made their own versions of "std_logic_arith/signed/unsigned". Of course for FPGA design this isn't important as all vendors are known to support the synopsys-based std_logic_arith/signed/unsigned.
* the vendors also had special hooks in their build tools that allowed the math to be sythesized optimally only when the correct library was used. Of course, the FPGA tools don't have this issue and clearly support both.
* VHDL actually treats slv as unsigned-ish in comparisons (when vectors are equal length). The default vector compare checks the leftmost bits until there is a difference. The std_logic's values are enumerated for their comparison, and '0' is less than '1', though 'Z' is greater than '1'. This has issues as "1000" < "11".
* std_logic_signed (or std_logic_unsigned) do not conflict* with numeric_std in practice. (there is an issue with "=" being redefined. The LRM claims that the redefinition should render both definitions invalid, though actual parsers will choose the most recent declaration).
* you can cherry-pick operators/functions from the libraries. eg, std_logic_signed."+" and std_logic_signed."-". Failing that, you could write your own "+" and "-" operators for slv's to allow addition/subtraction as logic operations. Doing this gets you the ability to do +/- on slv's where signed/unsigned doesn't matter.
* for some reason, you can and/or/xor unsigned values. Seems a bit odd that this didn't extend to allowing addition/subtraction of slv's...
* addition/subtraction can be legitimate logical operators. eg, (-x) and (x). (-x) xnor (x). etc...
* signed/unsigned are often a poor choice for the type of a signal. eg, fifo pointers have sequential ordering. calling them signed/unsigned would imply you could compare them in a meaningful way using ">". This is not the case.
* Verilog is very popular and people routinely accept the "unsigned-default" representation without issue.
* While you can make unsigned/signed ports in VHDL, this still doesn't remove all of the typecasting micromanagement.
* the linked blog is wrong -- std_logic_arith does not defined operations on slv's. That is done using std_logic_unsigned or std_logic_signed.
* there is so much backlash from some people that anything short of stock numeric_std only will result in them lecturing you about the evils of std_logic_arith.
My preferred style allows addition/subtraction/negation with slv. Something becomes signed/unsigned only if it is multiplied, compared lesser/greater, or if it actually represents a signed value. I tend to avoid ">=" when a simple "=" will work. As a result, I don't litter my code with type conversions unless they actually matter.
For the fifo-pointer example, I actually find myself using integer variables more often. This is partially due to synthesizer quirks when inferring block rams.