麦吉丽特约代理拿货:NV笔试2011 asic最后一题
来源:百度文库 编辑:九乡新闻网 时间:2024/10/04 04:42:41
[答疑互动] NV笔试2011 asic最后一题
笔试 本帖最后由 aaron_09 于 2011-9-25 21:00 编辑 ( J6 ~" ?5 G& V7 [. x6 N& S$ e- N
发个笔试题 攒rp
asic的笔试题个人觉得有难度啊
最后一题是 将 C code 翻译成成 RTL code
———————————————————— o$ B0 c" n7 i: y4 s7 ?
mem[256] = {8 J; X$ \& M/ g. E A" k+ p
0 7 6 6 5 5 5 5 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3. `$ c! i/ L# j0 ]/ o2 b3 Q: C
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 B& |- P( e7 p7 D+ C, m% U
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 18 `1 R% F' R% K- ~- x
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 U! o+ r1 e/ R1 l: I. B7 ?
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0& A. y3 J% G, |9 y1 K( a9 y
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
}
int arith_c::bin(int bit, int prob) {
int left = 1 + (((high-1)*prob)>>8);& _ K+ r& c) E% V7 I
if (bit) {. @8 q' d; D- v; [( x, |
low +=left;* L( y. o( Y# I: h( |! f9 s
high -=left;0 h7 i9 f& U6 i4 _4 c* g
} else {
high =left;
}
int shift = norm[high];$ M0 h( k+ z! b$ F. b
high <<=shift;
count += shift;
return count;
}
: k8 F9 C" s7 p4 |/ Q" j
RTL code$ {. Z3 H, D5 j2 [* r
Module arith();
input clk;
input reset;//negative async reset
input bit;
input [7:0] prob;
input [31:0] count;
Output [31:0] count_new; //this one is the 'return count' in C code % r! N% X: P! c# G5 c7 C# Q
reg [31:0] low;//reset to 0;) Q" V& O2 R5 Q- i) p% ~- G+ I
reg [7:0] high; //reset to 255;
. V$ G. j/ m% Y2 p( T) {
//fill your RTL here;
//…0 _ l& B% w7 I/ b g) Z
————————————————————
NV笔试2011 asic最后一题
笔试题
IBM笔试题求解?
笔试题(C++)
一道Loadrunner笔试题
考驾照笔试题
出纳笔试题
CCIE RS笔试考试讲解一
请教一道华为笔试题
.net笔试题(多套)
DFT的外企笔试题
工程管理人员招聘笔试题
中国银行校园招聘笔试题
财务部会计招聘-笔试题
硬件工程师笔试题 搜集
预算员笔试题及答案
华为笔试题含答案
2011国家公务员笔试分数线划定
2011福建省考笔试辅导班
ASB笔试回忆(2011)
UNICODE和ASIC码互换
大唐移动笔试题 - IT类(软硬件)笔试题目及笔经精华资料专版 - 笔试题目、笔经大全 -...
2011年北大自主招生联考部分笔试真题揭秘
2011年计算机等级二级C语言笔试题及答案(2-5)