element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Summer of FPGA
  • Challenges & Projects
  • Design Challenges
  • Summer of FPGA
  • More
  • Cancel
Summer of FPGA
Blog HACK CPUMOD S7 #1: Proposal
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: pandoramc
  • Date Created: 29 Dec 2021 11:11 PM Date Created
  • Views 2699 views
  • Likes 6 likes
  • Comments 2 comments
  • fpga
  • HACK CPU
  • summer of fpga
  • cmod s7
Related
Recommended

HACK CPUMOD S7 #1: Proposal

pandoramc
pandoramc
29 Dec 2021

The main idea is take a basic CPU to implement in the FPGA. Nowadays, there are some advanced CPU to develop a system like MIPS, ARM, RISC V, Microblaze and so on. Despite the availability of this components, the concept could be obscure for undergraduates or people that want understand the computer architecture. For these reasons, there is a small CPU called HACK. This CPU, developed in the NAND to Tetris courseware, has the following Instuction Set Architecture (ISA)

HACK CPU ISA

This ISA could be limited or incomplete for actual processors because there are instructions like load immediate, add immediate, rigth shift and more advanced. But for understanding purposes, we will find this ISA useful to implement small assembly programs with the author's provided tools. At this point, the ISA metion which instructions will be executed in the processor, but trere is not information about how the instructions are implemented still. The basic HACK Computer System has program memory, data memory, processor and the peripheral memory map. According to courseware, available in https://www.nand2tetris.org/course, the following diagram illustrates the abstract implementation of this system.

image

The processor, in my opinion, solve all that problems that could be not defined by Hardware or the Hardware resources are limited. Let's consider the Floating-Point operations, the processor consider the IEEE-754 to synthetize the number arithmetics but it will take a lot of clock cycles compared with the Hardware implementations. Both solutions are good, but time restrictions must be accomplish in some applications.The Hardware solution depends only in the processors data transfer, requiring some clock cycles according to hardware approaches. Finally, Board Support Package (BSP) and Special Registers (SR) will be added to the implementation to add peripherals as co-processors in some tasks like PWM and Counters.

Some of the interfacing components that will be considered for the BSP and Interfacing are the following:

image

Some of them cannot be configured with only one register or could be confusing package the configuration and data bits in the same register. Consequently, a Memory Map is needed to configure and share data with the peripherals.

All the above is a brief of what are the challenges to implement a CPU with peripheral support. At the end of the challenge, we will obtain a tiny microcontroller.

  • Sign in to reply
  • pandoramc
    pandoramc over 3 years ago in reply to michaelkellett

    Hi, I made a little extension of the content, for the following stages I will add more precise information about the proposed design with Xilinx platform. I made an implementation for other platform, available here, but this time I want to extend the implementation capabilities. Unfortunately the community brought some problems, I cannot update some fields of my RoadTest, consequently, I have limited control with the localization of the public URL.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • michaelkellett
    michaelkellett over 3 years ago

    I think you have posted other articles about this but I can't find them on the new website, tried looking under content under your name and searching the HACK tag.

    I can't understand your table, could you possibly expand the instruction explanations - maybe you did this already but the article is lost.

    Is there a web link that you can provide which takes us to a good descriptiuon of the processor ?

    Thanks.

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube