ALU

所属分类:VHDL/FPGA/Verilog
开发工具:Others
文件大小:2413KB
下载次数:2
上传日期:2019-01-25 20:55:41
上 传 者卷卷卷卷
说明:  1、撰写一个ALU部件,内部只能使用一个加法器,实现MIPS指令集中所有运算,包括加减乘除、逻辑运算等。乘除包括有符号、无符号运算。 2、设计语言布线,建议使用Chisel,也可以使用Verilog,请自行选择。 3、对于乘法和除法的实现,不用考虑使用的周期数,可以使用最简单的算法,只要结果正确即可,主要目的是练习状态机的使用。 4、所谓只用一个加法器,意思是说乘除法不要使用额外的加法器,与加减法共用同一个加法器。
(1. Write an ALU component, which can only use one adder internally to implement all operations in MIPS instruction set, including addition, subtraction, multiplication and division, logical operations, etc. Multiplication and division includes signed and unsigned operations. 2. Design language wiring. It is recommended to use Chisel or Verilog. Please choose your own. 3. For the implementation of multiplication and division, the simplest algorithm can be used without considering the number of cycles used. As long as the results are correct, the main purpose is to practice the use of state machines. 4. The so-called use of only one adder means that multiplication and division do not use additional adders and share the same adder with addition and subtraction.)

文件列表:
ALU (0, 2019-01-25)
ALU\2018-05-12 19-04-01屏幕截图.png (317519, 2018-05-12)
ALU\2018-05-12 19-04-37屏幕截图.png (335289, 2018-05-12)
ALU\2018-05-12 19-04-58屏幕截图.png (335590, 2018-05-12)
ALU\2018-05-12 19-08-03屏幕截图.png (365948, 2018-05-12)
ALU\MyChiselProject (0, 2019-01-25)
... ...

Chisel Project Template ======================= You've done the chisel [tutorials](https://github.com/ucb-bar/chisel-tutorial.git), and now you are ready to start your own chisel project. The following procedure should get you started with a clean running [Chisel3](https://github.com/ucb-bar/chisel3.git) project. ## Make your own Chisel3 project ### How to get started The first thing you want to do is clone this repo into a directory of your own. I'd recommend creating a chisel projects directory somewhere ```sh mkdir ~/ChiselProjects cd ~/ChiselProjects git clone https://github.com/ucb-bar/chisel-template.git MyChiselProject cd MyChiselProject ``` ### Make your project into a fresh git repo There may be more elegant way to do it, but the following works for me. **Note:** this project comes with a magnificent 339 line (at this writing) .gitignore file. You may want to edit that first in case we missed something, whack away at it, or start it from scratch. #### Clear out the old git stuff ```sh rm -rf .git git init git add .gitignore * ``` #### Rename project in build.sbt file Use your favorite text editor to change the first line of the **build.sbt** file (it ships as ```name := "chisel-module-template"```) to correspond to your project.
Perhaps as ```name := "my-chisel-project"``` #### Clean up the README.md file Again use you editor of choice to make the README specific to your project. Be sure to update (or delete) the License section and add a LICENSE file of your own. #### Commit your changes ``` git commit -m 'Starting MyChiselProject' ``` Connecting this up to github or some other remote host is an exercise left to the reader. ### Did it work? You should now have a project based on Chisel3 that can be run.
So go for it, at the command line in the project root. ```sh sbt 'testOnly gcd.GCDTester -- -z Basic' ``` >This tells the test harness to only run the test in GCDTester that contains the word Basic There are a number of other examples of ways to run tests in there, but we just want to see that one works. You should see a whole bunch of output that ends with something like the following lines ``` [info] [0.001] SEED 1506028591907 test GCD Success: 168 tests passed in 1107 cycles taking 0.203969 seconds [info] [0.191] RAN 1102 CYCLES PASSED[info] GCDTester: [info] GCD [info] GCD [info] Basic test using Driver.execute [info] - should be an alternative way to run specification [info] using --backend-name verilator [info] running with --is-verbose creats a lot [info] using --help [info] ScalaTest [info] Run completed in 1 second, ***2 milliseconds. [info] Total number of tests run: 1 [info] Suites: completed 1, aborted 0 [info] Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0 [info] All tests passed. [info] Passed: Total 1, Failed 0, Errors 0, Passed 1 [success] Total time: 2 s, completed Sep 21, 2017 9:12:47 PM ``` If you see the above then... ### It worked! You are ready to go. We have a few recommended practices and things to do. * Use packages and following conventions for [structure](http://www.scala-sbt.org/0.13/docs/Directories.html) and [naming](http://docs.scala-lang.org/style/naming-conventions.html) * Package names should be clearly reflected in the testing hierarchy * Build tests for all your work. * This template includes a dependency on the Chisel3 IOTesters, this is a reasonable starting point for most tests * You can remove this dependency in the build.sbt file if necessary * Change the name of your project in the build.sbt * Change your README.md ## Development/Bug Fixes This is the release version of chisel-template. If you have bug fixes or changes you would like to see incorporated in this repo, please checkout the master branch and submit pull requests against it. ## License This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to

近期下载者

相关文件


收藏者