11

Click here to load reader

Example my hdl

Embed Size (px)

DESCRIPTION

example code for MyHDL

Citation preview

Page 1: Example my hdl

MyHDLSeanChen2013/02/21

13年2月18日星期⼀一

Page 2: Example my hdl

• What’s Hardware?, What’s Software? What’s Hardware Simulation language?

13年2月18日星期⼀一

Page 3: Example my hdl

13年2月18日星期⼀一

Page 4: Example my hdl

• tool chain

• ARM, X86(instruction set)

• hardware architecture

• pipeline deep, ALUS, cache level,

• IF,DEC,OP,MEM(L/S),Cache(h/m)

• Python CPython bytecode

• >>> dis.dis(myfunc)

• GCC for c/c++, PyObject

• % gcc -Wall -g -save-temps -lpython2.7

• llvm

13年2月18日星期⼀一

Page 5: Example my hdl

• which one is better?

• short bytecode

• Multi Instructions load (hardware Support ex: GPU(DSP))

• e=a+b, f=c+d

• add %e %f, %a %b %c %d13年2月18日星期⼀一

Page 6: Example my hdl

How to define Hardware?

13年2月18日星期⼀一

Page 7: Example my hdl

• one ALU

• a+b+c+d

• 3 cycles

• ex:

• test_myhdl/example/serial_1_alu.py

a

確保公司能確實履行協議

b

+

+

+

c

d

13年2月18日星期⼀一

Page 8: Example my hdl

• two ALUs

• (a+b)+(c+d)

• two cycles

• ex:

• test_myhdl/example/pipe_2x1_alu.py

a

確保公司能確實履行協議

b

+ +

+

c d

13年2月18日星期⼀一

Page 9: Example my hdl

• If your IP is already? what will you do in the next steps?

13年2月18日星期⼀一

Page 10: Example my hdl

• pre silicon

• unittest

• test sequences

• function

• top test

• raw performance(coverage)

• application test

• regression(Jenkins)

13年2月18日星期⼀一