roife / roife.github.io

My blog
10 stars 2 forks source link

2020/12/02/buaa-co-lab-p6/ #12

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

「BUAA-CO-Lab」 P6 流水线 CPU-lite2 - roife 的博客 | Roife Blog

roife 的魔法科见闻

https://roife.github.io/2020/12/02/buaa-co-lab-p6/

DouyaBula commented 1 year ago

madd那个感觉直接这样写简单点

{temp_hi, temp_lo} <= $signed({hi, lo}) + $signed(rs) * $signed(rt);
roife commented 1 year ago

madd那个感觉直接这样写简单点

{temp_hi, temp_lo} <= $signed({hi, lo}) + $signed(rs) * $signed(rt);

博客里那么写只是因为 Verilog 对于 $signed 的处理太 confusing 了,如果对这个语法现象比较清楚的话可以用最简单的写法