SlideShare a Scribd company logo
Just enough information to program a Blackfin 90% of this course can be done knowing less than 10% of the Blackfin Instructions   Familiarization assignment for the  Analog Devices’ VisualDSP++ Integrated Development Environment
Reminder – Tutorial tomorrow -- Thursday This will help to get ahead on the assignments
Tackled today Recipe for  Just in time knowledge    Need  a dollop of “C++” code  A smizzen of knowledge to build the simplest possible  Blackfin  assembly language  for-loop { }  and while { }  A pinch of Window’s Experience And a bowl to put the ingredients in (a computer account with password) and somebody else to do all the clean-up (a partner) and a desk in Labs ICT318 and 320.
VisualDSP++  IDE Analog Devices’ integrated development environment (IDE) has been used in the following courses Blackfin – ADSP-BF533 ENCM415 – Assembly language and interfacing (2004)  ENCM417 – Switching to Blackfin for 2007 ENCM491 – Real Time Systems (2003) ENEL619.23 -- High speed embedded system architectures (2004) ENEL583/589 – Many 4 th  year team projects (2004)  TigerSHARC – ADSP-TS201 ENCM515 – Comparative Processor Architectures for DSP (Since 1999) ENEL619.23 -- High speed embedded system architectures (2004)
Just enough to know If time today will do a demo.  Build a directory U:/ENCM415/Assignment Remember to insert the  BF533  board power plug (check that lights on board flash) Activate  VisualDSP  -- Log into a station and use Analog devices  CONFIGURATOR  to set up a “BF533 session” to connect to the hardware Use VisualDSP++  and activate a Blackfin BF533 session  – lights should pause Build a  Blackfin  Project, add to your directory Add your  C++ files  to the project Compile, Link and Run using the equivalent commands as with Microsoft Visual Basic, Visual Studio  etc Add your assembly  ASM files  to the  Blackfin  project Compile, Link and Run using the equivalent commands as with Microsoft Visual Basic, Visual Studio  etc Don’t forget to add some tests so that you know the code is working
Analog Devices CONFIGURATOR
Run VisualDSP – Add New Project
WRITE  main.cpp , ADD  to Project
Then  BUILD  (which causes a  LOAD) Build and load
Then  Debug | Run  the code
Prepare for Assignment – C++ result
C++ Version of assignment
Assignment talks about “auto-increment”. Here is how to “try” to get compiler to do it
Prepare  main( )  to call assembly code and  CHECK the results
We thought we needed the function Assignment1_ASMversion( ) However the linker is worried about not finding _Assignment1_ASMversion__Fv Build WITHOUT ADDING assembly code file Error message is VERY SPECIAL
Standard Format “Assembly code” stub Header info Prologue Code to return value Epilogue
Result using “Assembly code” stub Exactly the result we expected
Keyword –  R0  – 32-bit Data Register R0 = 7;  // This returns value 7 … Assembly code comment End of line marker 32 bit data register  -- R0, R1, R2,  R3, R4, R5, R6, R7
Keyword –  P0  – 32-bit pointer Register 32 bit pointer register  -- P0, P1, P2,  P3, P4 Final exam question from last year Careful –  when not in the assembler, the linker may give errors which mention  p0  which stands for  processor  0. The blackfin hardware can come in multi-core version (p0 and p1 for BF561) or multi-processor version.
Keyword 32-bit Frame pointer 32 bit Frame pointer  --  FP As on many processors  LINK  and  UNLINK  instructions involve hidden operations on FP and SP (stack pointer) More on that in a later class
Keyword – Memory operations 32 bit memory read  [  ] – long-word access  R0 = [FP + 4]; If FP contains the value 0x20000000 then fetch the 32-bit value starting at memory location 0x20000004 and place in data register R0
Keyword – Memory operations 16 bit memory read  W[  ] –word access  R1.H = W[FP + 28]; If FP contains the value 0x20000000 then fetch the 16-bit value starting at memory location 0x20000028 and place in data register R1.H  which is the UPPER part of the register R1  (R1.H and R1.L)
Keyword – Memory operations 8 bit memory reads  are also possible  B[FP + 4];
Perhaps time for a working example
Programmer’s model 32 bit data register  R0, R1, R2,  R3, R4, R5, R6, R7 16 bit data register  R0.H, R1.H, R2.H,  R3.H ……. R7.H R0.L, R1.L, R2.L,  R3.L ………. R7.L 32 bit Pointer register  P0, P1, P2,  P3, P4 NO  16 bit Pointer registers 32 bit Frame Pointer  --  FP 32 bit Stack Pointer  --  SP
Memory access MUST be done via a Pointer register 32-bit Memory access Place value 0x2000 into register P1 THEN R0 = [P1] accesses (reads) the 32-bit value at 0x2000 and leaves P1 unchanged (P1 still equals 0x2000) R0 = [P1 + 4] accesses (reads) the 32-bit value at 0x2004 and leaves P1 unchanged (P1 still equals 0x2000) R0 = [P1++] accesses (reads) the 32-bit value at 0x2000 and  autoincrements  P1 by the size of a  long word (4 bytes)   (P1 NOW equals 0x2004)
Memory access MUST be done via a Pointer register 16-bit Memory access Place value 0x4000 into register P2 THEN R0 = W[P2] accesses (reads) the 16-bit value at 0x4000 and leaves P2 unchanged (P2 still equals 0x4000) R0 = W[P2 + 4] accesses (reads) the 16-bit value at 0x4004 and leaves P2 unchanged (P2 still equals 0x4000) R0 = W[P2++] accesses (reads) the 16-bit value at 0x4000 and  autoincrements  P2 by the size of a  word (2 bytes)   (P2 NOW equals 0x2002)
Just enough to know If time today will do a demo.  Build a directory U:/ENCM415/Assignment Remember to insert the  BF533  board power plug (check that lights on board flash) Activate  VisualDSP  Log into a station and use Analog devices  CONFIGURATOR  to set up a “BF533 session” to connect to the hardware Use VisualDSP++  and activate a Blackfin BF533 session  – lights should pause Build a  Blackfin  Project, add to your directory Add your  C++ files  to the project Compile, Link and Run using the equivalent commands as with Microsoft Visual Basic, Visual Studio  etc Add your  ASM files  to the project Compile, Link and Run using the equivalent commands as with Microsoft Visual Basic, Visual Studio  etc Don’t forget to add some tests so that you know the code is working

More Related Content

PPTX
Bp150522
PDF
High-performance packet filtering with Pflua (FOSDEM 2015)
PPTX
Intel 8051 Programming in C
PPTX
8051 Assembly Language Programming
PPT
Assembly Language Lecture 4
PPT
Introduction to Assembly Language
PDF
Issues in the design of Code Generator
PPTX
Code optimization
Bp150522
High-performance packet filtering with Pflua (FOSDEM 2015)
Intel 8051 Programming in C
8051 Assembly Language Programming
Assembly Language Lecture 4
Introduction to Assembly Language
Issues in the design of Code Generator
Code optimization

What's hot (20)

PPTX
Winter training,Readymade Projects,Buy Projects,Corporate Training
PDF
17431 microprocessor & programming
PPTX
Assembly Language -I
PPT
1347 assemblylanguageprogrammingof8051-100523023308-phpapp01
PPT
The 8051 assembly language
PPT
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
PDF
Rcpp
PPTX
Stack in 8085 microprocessor
PPT
8085 instruction set and Programming
PDF
Chapter 7 8051 programming in c
PPTX
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
PDF
Assembly language i
PPTX
Assembly 8086
PPT
Assembly Language Lecture 1
PPT
Shift rotate
PDF
Assembly language part I
PPT
Assembly Language Lecture 2
PPT
MICROPROCESSOR INSTRUCTION SET OF 8085
PDF
Winter training,Readymade Projects,Buy Projects,Corporate Training
17431 microprocessor & programming
Assembly Language -I
1347 assemblylanguageprogrammingof8051-100523023308-phpapp01
The 8051 assembly language
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Rcpp
Stack in 8085 microprocessor
8085 instruction set and Programming
Chapter 7 8051 programming in c
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly language i
Assembly 8086
Assembly Language Lecture 1
Shift rotate
Assembly language part I
Assembly Language Lecture 2
MICROPROCESSOR INSTRUCTION SET OF 8085
Ad

Similar to 06 Justenough Information (20)

PPT
Lect05 Prog Model
PPTX
Code Generation Part-1 in Compiler Construction
PPTX
arduinoedit.pptx
PPTX
Introduction to Microprocesso programming and interfacing.pptx
PPTX
C from hello world to 010101
DOCX
MES LAB MANUAL for engineering students.
PPT
My seminar new 28
PPTX
ISA.pptx
PPTX
Assembly Language In Electronics
PPTX
computer organization and architecture notes
DOCX
Chapter 1SyllabusCatalog Description Computer structu
PPTX
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
PPTX
Pi Is For Python
PPTX
Introduction to computer architecture .pptx
PDF
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
DOCX
GSP 215 RANK Education Counseling -- gsp215rank.com
PDF
Mp &mc programs
DOCX
GSP 215 RANK Education Your Life--gsp215rank.com
DOCX
GSP 215 RANK Lessons in Excellence-- gsp215rank.com
DOCX
GSP 215 RANK Inspiring Innovation--gsp215rank.com
Lect05 Prog Model
Code Generation Part-1 in Compiler Construction
arduinoedit.pptx
Introduction to Microprocesso programming and interfacing.pptx
C from hello world to 010101
MES LAB MANUAL for engineering students.
My seminar new 28
ISA.pptx
Assembly Language In Electronics
computer organization and architecture notes
Chapter 1SyllabusCatalog Description Computer structu
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Pi Is For Python
Introduction to computer architecture .pptx
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
GSP 215 RANK Education Counseling -- gsp215rank.com
Mp &mc programs
GSP 215 RANK Education Your Life--gsp215rank.com
GSP 215 RANK Lessons in Excellence-- gsp215rank.com
GSP 215 RANK Inspiring Innovation--gsp215rank.com
Ad

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Spectroscopy.pptx food analysis technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Approach and Philosophy of On baking technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
1. Introduction to Computer Programming.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
Dropbox Q2 2025 Financial Results & Investor Presentation
Mobile App Security Testing_ A Comprehensive Guide.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Machine learning based COVID-19 study performance prediction
Spectroscopy.pptx food analysis technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
20250228 LYD VKU AI Blended-Learning.pptx
A Presentation on Artificial Intelligence
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
Encapsulation_ Review paper, used for researhc scholars
Approach and Philosophy of On baking technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
cuic standard and advanced reporting.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
1. Introduction to Computer Programming.pptx
Assigned Numbers - 2025 - Bluetooth® Document
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Diabetes mellitus diagnosis method based random forest with bat algorithm

06 Justenough Information

  • 1. Just enough information to program a Blackfin 90% of this course can be done knowing less than 10% of the Blackfin Instructions Familiarization assignment for the Analog Devices’ VisualDSP++ Integrated Development Environment
  • 2. Reminder – Tutorial tomorrow -- Thursday This will help to get ahead on the assignments
  • 3. Tackled today Recipe for Just in time knowledge  Need a dollop of “C++” code A smizzen of knowledge to build the simplest possible Blackfin assembly language for-loop { } and while { } A pinch of Window’s Experience And a bowl to put the ingredients in (a computer account with password) and somebody else to do all the clean-up (a partner) and a desk in Labs ICT318 and 320.
  • 4. VisualDSP++ IDE Analog Devices’ integrated development environment (IDE) has been used in the following courses Blackfin – ADSP-BF533 ENCM415 – Assembly language and interfacing (2004) ENCM417 – Switching to Blackfin for 2007 ENCM491 – Real Time Systems (2003) ENEL619.23 -- High speed embedded system architectures (2004) ENEL583/589 – Many 4 th year team projects (2004) TigerSHARC – ADSP-TS201 ENCM515 – Comparative Processor Architectures for DSP (Since 1999) ENEL619.23 -- High speed embedded system architectures (2004)
  • 5. Just enough to know If time today will do a demo. Build a directory U:/ENCM415/Assignment Remember to insert the BF533 board power plug (check that lights on board flash) Activate VisualDSP -- Log into a station and use Analog devices CONFIGURATOR to set up a “BF533 session” to connect to the hardware Use VisualDSP++ and activate a Blackfin BF533 session – lights should pause Build a Blackfin Project, add to your directory Add your C++ files to the project Compile, Link and Run using the equivalent commands as with Microsoft Visual Basic, Visual Studio etc Add your assembly ASM files to the Blackfin project Compile, Link and Run using the equivalent commands as with Microsoft Visual Basic, Visual Studio etc Don’t forget to add some tests so that you know the code is working
  • 7. Run VisualDSP – Add New Project
  • 8. WRITE main.cpp , ADD to Project
  • 9. Then BUILD (which causes a LOAD) Build and load
  • 10. Then Debug | Run the code
  • 11. Prepare for Assignment – C++ result
  • 12. C++ Version of assignment
  • 13. Assignment talks about “auto-increment”. Here is how to “try” to get compiler to do it
  • 14. Prepare main( ) to call assembly code and CHECK the results
  • 15. We thought we needed the function Assignment1_ASMversion( ) However the linker is worried about not finding _Assignment1_ASMversion__Fv Build WITHOUT ADDING assembly code file Error message is VERY SPECIAL
  • 16. Standard Format “Assembly code” stub Header info Prologue Code to return value Epilogue
  • 17. Result using “Assembly code” stub Exactly the result we expected
  • 18. Keyword – R0 – 32-bit Data Register R0 = 7; // This returns value 7 … Assembly code comment End of line marker 32 bit data register -- R0, R1, R2, R3, R4, R5, R6, R7
  • 19. Keyword – P0 – 32-bit pointer Register 32 bit pointer register -- P0, P1, P2, P3, P4 Final exam question from last year Careful – when not in the assembler, the linker may give errors which mention p0 which stands for processor 0. The blackfin hardware can come in multi-core version (p0 and p1 for BF561) or multi-processor version.
  • 20. Keyword 32-bit Frame pointer 32 bit Frame pointer -- FP As on many processors LINK and UNLINK instructions involve hidden operations on FP and SP (stack pointer) More on that in a later class
  • 21. Keyword – Memory operations 32 bit memory read [ ] – long-word access R0 = [FP + 4]; If FP contains the value 0x20000000 then fetch the 32-bit value starting at memory location 0x20000004 and place in data register R0
  • 22. Keyword – Memory operations 16 bit memory read W[ ] –word access R1.H = W[FP + 28]; If FP contains the value 0x20000000 then fetch the 16-bit value starting at memory location 0x20000028 and place in data register R1.H which is the UPPER part of the register R1 (R1.H and R1.L)
  • 23. Keyword – Memory operations 8 bit memory reads are also possible B[FP + 4];
  • 24. Perhaps time for a working example
  • 25. Programmer’s model 32 bit data register R0, R1, R2, R3, R4, R5, R6, R7 16 bit data register R0.H, R1.H, R2.H, R3.H ……. R7.H R0.L, R1.L, R2.L, R3.L ………. R7.L 32 bit Pointer register P0, P1, P2, P3, P4 NO 16 bit Pointer registers 32 bit Frame Pointer -- FP 32 bit Stack Pointer -- SP
  • 26. Memory access MUST be done via a Pointer register 32-bit Memory access Place value 0x2000 into register P1 THEN R0 = [P1] accesses (reads) the 32-bit value at 0x2000 and leaves P1 unchanged (P1 still equals 0x2000) R0 = [P1 + 4] accesses (reads) the 32-bit value at 0x2004 and leaves P1 unchanged (P1 still equals 0x2000) R0 = [P1++] accesses (reads) the 32-bit value at 0x2000 and autoincrements P1 by the size of a long word (4 bytes) (P1 NOW equals 0x2004)
  • 27. Memory access MUST be done via a Pointer register 16-bit Memory access Place value 0x4000 into register P2 THEN R0 = W[P2] accesses (reads) the 16-bit value at 0x4000 and leaves P2 unchanged (P2 still equals 0x4000) R0 = W[P2 + 4] accesses (reads) the 16-bit value at 0x4004 and leaves P2 unchanged (P2 still equals 0x4000) R0 = W[P2++] accesses (reads) the 16-bit value at 0x4000 and autoincrements P2 by the size of a word (2 bytes) (P2 NOW equals 0x2002)
  • 28. Just enough to know If time today will do a demo. Build a directory U:/ENCM415/Assignment Remember to insert the BF533 board power plug (check that lights on board flash) Activate VisualDSP Log into a station and use Analog devices CONFIGURATOR to set up a “BF533 session” to connect to the hardware Use VisualDSP++ and activate a Blackfin BF533 session – lights should pause Build a Blackfin Project, add to your directory Add your C++ files to the project Compile, Link and Run using the equivalent commands as with Microsoft Visual Basic, Visual Studio etc Add your ASM files to the project Compile, Link and Run using the equivalent commands as with Microsoft Visual Basic, Visual Studio etc Don’t forget to add some tests so that you know the code is working