基于IDEA与Mill构建Windows下的Chisel开发环境——香山处理器源码解析实战

scala编译器mill的安装及scoop安装的坑 最近开始写scala,需要安装mill编译器。mill官网下载后保存为mill.bat 公司电脑是win10的,只能通过scoop等工具安装mill,如下图 所以第一步是安装scoop scoop的github地址 里面是这样描述的 打开你的cmd,先进入powershell: 接下来查看版本(可选): $PSVersionTable.PSVersion.Major #查看Powershell版本 $PSVersionTable.CLRVersion.Major #查看.NET Framework版本 阅读详情

1. 环境准备:从零搭建Chisel开发基础

在Windows系统上搭建Chisel开发环境,首先需要配置好基础软件栈。我刚开始接触硬件设计时,发现很多人推荐Linux环境,但其实Windows配合合适的工具链同样高效。核心需要准备四样东西:Java运行时、IDEA集成开发环境、Mill构建工具和Git版本控制系统。

Java环境是基础中的基础,因为Chisel和Mill都是基于JVM生态的。我建议直接选择Java 17这个长期支持版本,稳定性经过大量项目验证。安装完成后记得在终端执行java --version验证,看到类似"Java 17.0.2 LTS"的输出才算成功。如果遇到环境变量问题,有个小技巧:在Windows搜索栏输入"环境变量",选择"编辑系统环境变量",在"高级"选项卡里点击"环境变量",在"系统变量"区域找到Path条目,将Java安装路径下的bin目录添加进去。

IDEA我推荐使用社区版,完全免费且功能足够强大。安装时注意勾选"Add launchers to the PATH"选项,这样后期可以在终端直接用idea命令打开项目。Mill构建工具是Chisel项目的核心构建系统,相当于Java界的Maven或Gradle。下载时直接获取最新版本的assembly包,重命名为mill.bat方便使用。Git则是代码管理必备,安装后记得配置用户信息,否则后续克隆仓库可能会报错。

2. 获取香山处理器源码

香山处理器是近年来最受关注的国产开源RISC-V处理器项目,其代码结构复杂但设计精美,非常适合作为学习Chisel的实战案例。源码托管在GitHub上,使用git clone https://github.com/OpenXiangShan/XiangShan.git即可拉取到本地。这里有个实用建议:尽量选择固态硬盘存放代码,因为后续构建过程会产生大量中间文件,磁盘读写速度直接影响体验。

克隆完成后进入XiangShan目录,你会发现项目使用了Git子模块来管理依赖。在Linux环境下通常用make init初始化,但Windows没有

香山处理器跑仿真和跑FPGA两套环境配置过程小结 裸机ubuntu18.04上运行香山处理器(南湖)make verilog,以及 vmware虚拟机上运行香山处理器make emu 阅读详情

相关推荐

体验开源香山高性能开源 RISC-V 处理器

体验香山使用的处理器协同仿真框架

阳光8088的专栏 2245

香山开源RISC-V处理器:架构解析与开发实践

RISC-V作为一种开源指令集架构,正在改变处理器设计的游戏规则。其模块化设计允许开发者自由组合扩展指令,从嵌入式设备到高性能计算都能灵活适配。香山处理器采用Chisel硬件构建语言实现,这种基于Scala的DSL通过高层次抽象显著提升开发效率,相比传统Verilog可减少80%代码量。在技术实现上,香山创新性地采用雁栖湖微架构,支持RV64GC指令集,8核设计配合2MB共享缓存,在28nm工艺下实现1.3GHz主频。对于开发者而言,项目提供的完整工具链支持从RTL仿真到FPGA验证的全流程,特别适合进行计

weixin_30924087的博客 128

Fluent UDF实战:除了速度入口,你的DEFINE_PROFILE宏还能搞定这些边界条件(温度、组分、壁面接触角全解析)

本文深入解析Fluent UDF中DEFINE_PROFILE宏在复杂边界条件中的高阶应用,涵盖温度场、组分浓度和壁面接触角等关键场景。通过实战代码示例,展示如何实现空间梯度温度场、动态组分控制和接触角动态调整,助力CFD工程师突破标准界面限制,提升仿真精度和效率。

weixin_28688385的博客 453

从东南大学906被刷到调剂过程(内含个人感想)

介绍了自己在看到初试成绩,到后期复习以及调剂的全过程,当中也包含了自己的复试中的感想,希望大家理性看待。

Philo的博客 2862

Window系统下搭建GIT本地服务器

这是一篇在window下搭建git本地服务器的教程,带你一步步搭建出本地的git服务器。

qwer971211的博客 2万+

UFS 功能描述:UFS boot

UFS 启动过程介绍:启动配置,启动代码下载过程和安全性

m0_51720747的博客 1608

深度学习笔记——Transformer

本文详细介绍面试过程中可能遇到的Transformer知识点。

haopinglianlian的博客 1706

Firefox卸载卡住不动的解决方案

本文主要介绍了Firefox卸载卡住不动的解决方案,希望能对使用Windows的同学们有所帮助。 文章目录 1. 问题描述 2. 解决方案

weixin_43178406的博客 15万+

使用 MATLAB/Simulink 进行锂电池SOC估算和等效电路建模

本文介绍了使用MATLAB/Simulink进行锂电池SOC估算与等效电路建模的方法。首先阐述了SOC估算和等效电路模型的背景及重要性,然后详细讲解了系统结构设计的主要组成部分,包括电池模块、SOC估算模块(采用卡尔曼滤波器算法)和等效电路模型等。文章重点分步说明了建模过程:从创建Simulink项目、搭建电池模块,到实现SOC估算算法(提供示例代码),构建等效电路模型(Thevenin模型示例),添加传感器模块,最后设置仿真参数。通过仿真运行分析关键指标(SOC估算误差、电压偏差等)来评估模型性能,为锂电

xiaoheshang_123的博客 268

Lumerical 教程,包含作者个人理解及相关设计案例 (目前共计184篇,持续更新中)

4138。

u011699626的博客 1640

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

上一篇: 从时钟转发到数据流:RFSoC时钟架构的工程艺术与实战避坑指南
下一篇: 车载MCU:汽车电子系统的核心大脑与未来趋势
a1b2c3d
博客等级 码龄19年 591粉丝 1816原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值