1 / 57

High Level Language (HLL) Design Methodology Handel C

ECE 448 Lecture 12. High Level Language (HLL) Design Methodology Handel C. Main source s. Celoxica Ltd. Handel-C Language Reference Manual available on WebCT. Behavioral Synthesis. Behavioral Synthesis. I/O Behavior. Target Library. Algorithm. Behavioral Synthesis. RTL Design.

badrani
Download Presentation

High Level Language (HLL) Design Methodology Handel C

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE 448 Lecture 12 High Level Language (HLL)Design MethodologyHandel C ECE 448 – FPGA and ASIC Design with VHDL

  2. Main sources • Celoxica Ltd. • Handel-C Language Reference Manual • available on WebCT ECE 448 – FPGA and ASIC Design with VHDL

  3. Behavioral Synthesis ECE 448 – FPGA and ASIC Design with VHDL

  4. Behavioral Synthesis I/O Behavior Target Library Algorithm Behavioral Synthesis RTL Design Logic Synthesis Classic RTL Design Flow Gate level Netlist ECE 448 – FPGA and ASIC Design with VHDL

  5. Need for High-Level Design • Higher level of abstraction • Modeling complex designs • Reduce design efforts • Fast turnaround time • Technology independence • Ease of HW/SW partitioning ECE 448 – FPGA and ASIC Design with VHDL

  6. Advantages of Behavioral Synthesis • Easy to model higher level of complexities • Smaller in size source compared to RTL code • Generates RTL much faster than manual method • Multi-cycle functionality • Loops • Memory Access ECE 448 – FPGA and ASIC Design with VHDL

  7. High-Level Languages • C/C++-Based • Handel C– Celoxica Ltd., UK • Impulse C– Impulse Accelerated Technologies • Catapult C– Impulse Accelerated Technologies • System C– The Open SystemC Initiative • Java-based • Forge – Xilinx • JHDL – Brigham Young University ECE 448 – FPGA and ASIC Design with VHDL

  8. Other High-Level Design Flows • Matlab-based • System Generator for DSP–Xilinx • AccelChip DSP Synthesis–AccelChip • GUI Data-Flow based • Corefire–Annapolis Microsystems • RC Toolbox– DSPlogic ECE 448 – FPGA and ASIC Design with VHDL

  9. Handel C Design Flow ECE 448 – FPGA and ASIC Design with VHDL

  10. Design Flow Executable Specification Handel-C VHDL Synthesis EDIF EDIF Place & Route ECE 448 – FPGA and ASIC Design with VHDL

  11. Handel-C/ANSI-C Comparisons ANSI-C HANDEL-C Handel-C Standard Library ANSI-C Standard Library Preprocessors i.e. #define Parallelism Pointers Structures Channels Side Effects i.e. X = Y++ ANSI-C Constructs for, while, if, switch Arbitrary width variables Arrays Bitwise logical operators Enhanced bit manipulation Recursion Logical operators Arithmetic operators RAM, ROM Signals Floating Point Functions Interfaces ECE 448 – FPGA and ASIC Design with VHDL

  12. Variables ECE 448 – FPGA and ASIC Design with VHDL • Only one fundamental type for variables: int int 5 x; unsigned int 13 y; • Default types char 8 bits short 16 bits long 32 bits

  13. Type Summary ECE 448 – FPGA and ASIC Design with VHDL

  14. Arrays ECE 448 – FPGA and ASIC Design with VHDL • Same way as in ANSI-C int 6 x[7]; 7 registers of 6 bits wide unsigned int 6 x [4] [5] [6]; 120 registers of 6 bits wide • Index must be a compile time constant. If random access is required, consider using RAM or ROM

  15. Internal RAMs and ROMs ECE 448 – FPGA and ASIC Design with VHDL • Using ram and rom keywords ram int 6 a [43]; a RAM consisting of 43 entries of 6 bits wide rom int 16 b [4]; a ROM consisting of 4 entries of 16 bits wide • RAMs and ROMs are accessed the same way that arrays are accessed in ANSI-C • Index need not be a compile time constant

  16. Restrictions on RAMs and ROMs ECE 448 – FPGA and ASIC Design with VHDL • RAMs and ROMs are restricted to performing operations sequentially. Only one element may be addressed in any given clock cycle ram unsigned int 8 x [4]; x [1] = x [3] + 1; illegal if (x [0] == 0) x [1] = 1; illegal

  17. Multi-port RAMs ECE 448 – FPGA and ASIC Design with VHDL static mpram Fred { ram <unsigned 8> ReadWrite[256]; (read/write port) rom <unsigned 8> Read[256]; (read only port) } Now we can read and write in a given clock cycle

  18. Dual Port Memory ECE 448 – FPGA and ASIC Design with VHDL

  19. Handel-C Language (1) ECE 448 – FPGA and ASIC Design with VHDL A subset of ANSI-C Sequential software style with a “par” construct to implement parallelism A channel “chan” statement allows for communication and synchronization between parallel branches Level of design abstraction is above RTL but below behavioral

  20. Handel-C Language (2) ECE 448 – FPGA and ASIC Design with VHDL Each assignment and delay statement take one clock cycle Automatic generation of the state machine from an algorithmic description of the circuit in terms of parallel and sequential blocks Automatic scheduling of parallel and sequential blocks, that is the code following a group is scheduled only after that whole group has completed

  21. Parallelism Statement Parallel blocks ECE 448 – FPGA and ASIC Design with VHDL

  22. Channel Communication Statement Channel a b ECE 448 – FPGA and ASIC Design with VHDL

  23. Par construct - Examples ECE 448 – FPGA and ASIC Design with VHDL

  24. Par constructs - timing ECE 448 – FPGA and ASIC Design with VHDL

  25. Par construct – shift register ECE 448 – FPGA and ASIC Design with VHDL

  26. Channels ECE 448 – FPGA and ASIC Design with VHDL

  27. Channel Communication ECE 448 – FPGA and ASIC Design with VHDL • Reading from a channel Channel ? Variable; • Writing to a channel Channel ! Expression; • No simultaneous write to or read from a single channel par par { { out ! 3; in ? x; out ! 4; in ? y; } }

  28. Scope and Variable Sharing y w x z ECE 448 – FPGA and ASIC Design with VHDL int w; void main(void) { int x; { int y; ….. } { int z; ….. } }

  29. Statements ECE 448 – FPGA and ASIC Design with VHDL

  30. Bit Manipulation Operators ECE 448 – FPGA and ASIC Design with VHDL

  31. Handel-C Example x[n] 32 32 32 G31(z) G1(z) G0(z) z-1 z-1 z-1 void polyphase() { ram int IN_WIDTH pin0_0[2], pin0_1[2], pin0_2[2], pin0_3[2]; ram int IN_WIDTH pin1_0[2], pin1_1[2], pin1_2[2], pin1_3[2]; ram int IN_WIDTH pin2_0[2], pin2_1[2], pin2_2[2], pin2_3[2]; ….. while (1) { par { padd0_0[half] = (pmult0_0[half][15] @ (pmult0_0[half] \\ 7)) + (pmult0_1[half][15] @ (pmult0_1[half] \\ 7)); padd0_1[half] = (pmult0_2[half][15] @ (pmult0_2[half] \\ 7)) + (pmult0_3[half][15] @ (pmult0_3[half] \\ 7)); pmult0_0[half] = 0; pmult0_1[half] = -7 * (pin0_1[half][7] @ pin0_1[half][7] @ pin0_1[half][7] @ pin0_1[half][7] @ pin0_1[half][7] @ pin0_1[half][7] @ pin0_1[half][7] @ pin0_1[half][7] @ pin0_1[half]); pmult0_2[half] = 109 * (pin0_2[half][7] @ pin0_2[half][7] @ pin0_2[half][7] @ pin0_2[half][7] @ if (half) { par { output[0] ! (((padd0_0[1][9] @ padd0_0[1]) + (padd0_1[1][9] @ padd0_1[1])) \\ 3); ECE 448 – FPGA and ASIC Design with VHDL

  32. Take/drop operators ECE 448 – FPGA and ASIC Design with VHDL

  33. Concatenation ECE 448 – FPGA and ASIC Design with VHDL

  34. Bit selection ECE 448 – FPGA and ASIC Design with VHDL

  35. Bit selection ECE 448 – FPGA and ASIC Design with VHDL

  36. Width operator ECE 448 – FPGA and ASIC Design with VHDL

  37. Arithmetic Operators ECE 448 – FPGA and ASIC Design with VHDL

  38. Relational Operators ECE 448 – FPGA and ASIC Design with VHDL

  39. Relational Logical Operators ECE 448 – FPGA and ASIC Design with VHDL

  40. Bitwise Logical Operators ECE 448 – FPGA and ASIC Design with VHDL

  41. Compile Time Constant Expressions ECE 448 – FPGA and ASIC Design with VHDL

  42. Width of results (1) ECE 448 – FPGA and ASIC Design with VHDL

  43. Width of results (2) ECE 448 – FPGA and ASIC Design with VHDL

  44. Example - Accumulator ECE 448 – FPGA and ASIC Design with VHDL void main(void) { unsigned int 16 sum; unsigned int 8 data; chanin input; chanout output; sum = 0; do { input ? data; sum = sum + (0 @ data); } while (data!=0); output ! sum; }

  45. Handel C vs. C - functions Functions may not be called recursively, since all logic must be expanded at compile-time to generate hardware You can only call functions in expression statements. These statements must not contain any other calls or assignments. Variable length parameter lists are not supported. Old-style ANSI-C function declarations (where the type of the parameters is not specified) are not supported. main() functions take no arguments and return no values. Each main() function is associated with a clock. If you have more than one main() function in the same source file, they must all use the same clock. ECE 448 – FPGA and ASIC Design with VHDL

  46. Handel-C Overview • High-level language based on ISO/ANSI-C for the implementation of algorithms in hardware • Allows software engineers to design hardware without retraining • Clean extensions for hardware design including flexible data widths, parallelism and communications • Based on Communicating Sequential Process model • Independent parallel processes • “par” construct to specify parallel computation blocks within a process • Well defined timing model • Each statement takes a single clock cycle • Includes extended operators for bit manipulation, and high-level mathematical macros (including floating point) ECE 448 – FPGA and ASIC Design with VHDL

  47. Handel C Additional Features ECE 448 – FPGA and ASIC Design with VHDL

  48. Prialt statement ECE 448 – FPGA and ASIC Design with VHDL

  49. Restrictions on using Prialt statement ECE 448 – FPGA and ASIC Design with VHDL

  50. Macros and Functions ECE 448 – FPGA and ASIC Design with VHDL

More Related