<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=Create_Your_Own_Core</id>
	<title>Create Your Own Core - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=Create_Your_Own_Core"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=Create_Your_Own_Core&amp;action=history"/>
	<updated>2026-06-09T22:42:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=Create_Your_Own_Core&amp;diff=496&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;{{Gotoparent|Software}} This tutorial is intended to demonstrate how to create a complete ICE Core. Focus was placed on reducing the verbosity of this document; therefore, it...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=Create_Your_Own_Core&amp;diff=496&amp;oldid=prev"/>
		<updated>2020-04-14T15:07:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Gotoparent|Software}} This tutorial is intended to demonstrate how to create a complete ICE Core. Focus was placed on reducing the verbosity of this document; therefore, it...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Gotoparent|Software}}&lt;br /&gt;
This tutorial is intended to demonstrate how to create a complete ICE Core.&lt;br /&gt;
Focus was placed on reducing the verbosity of this document;&lt;br /&gt;
therefore, it contains only slightly more information than necessary.&lt;br /&gt;
It should be noted that this is ONE way to create an ICE Core, it is not the only way.&lt;br /&gt;
&lt;br /&gt;
== What this Tutorial Creates ==&lt;br /&gt;
This tutorial builds an ICE Core that simply doubles an input file.&lt;br /&gt;
It is meant to be purely instructional.&lt;br /&gt;
When complete, you will have the following cores:&lt;br /&gt;
&lt;br /&gt;
 JDK - the java reference implementation &lt;br /&gt;
 CPU - the native C implementation&lt;br /&gt;
 VHS - the verilator HDL simulator implementation&lt;br /&gt;
&lt;br /&gt;
Other cores (that aren't included in this tutorial) are:&lt;br /&gt;
&lt;br /&gt;
 GPU - the GPU implementation&lt;br /&gt;
 MLS - the MatLab Simulink implementation&lt;br /&gt;
 ICE - the ICE FPGA implementation&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
Here is the key for the symbols and notations used throughout this document:&lt;br /&gt;
&lt;br /&gt;
 $   are commands typed at a Linux terminal&lt;br /&gt;
 nM&amp;gt; are commands typed at a NeXtMidas prompt&lt;br /&gt;
 ++  are lines added to an existing file (do not include '++' characters in the file)&lt;br /&gt;
 !   are comments&lt;br /&gt;
&lt;br /&gt;
This example assumes that you have downloaded the following files (to a directory labeled 'Downloads' in your home folder):&lt;br /&gt;
* id_tutorial_1_0_1.tgz&lt;br /&gt;
* ice364-01.zip&lt;br /&gt;
* ice364-soc.zip&lt;br /&gt;
'''Note:''' We recommend that you always use the latest releases of ICE Software. This tutorial will work with the newest versions.&lt;br /&gt;
&lt;br /&gt;
== Installing the ICE Option Tree ==&lt;br /&gt;
If you already have an ICE Option Tree properly configured on your system then you may skip this section.&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/Downloads&lt;br /&gt;
 $ mv ice364-01.zip /midas/opt/&lt;br /&gt;
 $ cd /midas/opt&lt;br /&gt;
 $ rm icexxx&lt;br /&gt;
 $ unzip ice364-01.zip&lt;br /&gt;
 $ ln -sf ice364-01 icexxx&lt;br /&gt;
 $ cd&lt;br /&gt;
 $ nedit .cshrc&lt;br /&gt;
 ++  setenv ICEROOT /midas/opt/icexxx&lt;br /&gt;
 $ source .cshrc&lt;br /&gt;
&lt;br /&gt;
== Installing and Configuring the ICE SOC Content ==&lt;br /&gt;
 $ cd ~/Downloads&lt;br /&gt;
 $ mv ice364-soc.zip /midas/opt&lt;br /&gt;
 $ cd /midas/opt&lt;br /&gt;
 $ rm socxxx&lt;br /&gt;
 $ unzip ice364-soc.zip&lt;br /&gt;
 $ mv soc soc364&lt;br /&gt;
 $ ln -sf soc364 socxxx&lt;br /&gt;
 $ cd socxxx&lt;br /&gt;
 $ nedit xilinx&lt;br /&gt;
 ! NOTE: go to 'if' block under the line 'set pe = BAD' (~line 170 in ice364-soc)&lt;br /&gt;
 ++ if ( $sig =~ ??id) set pe = ICEDOUBLE&lt;br /&gt;
 $ cd sim&lt;br /&gt;
 $ nedit mdefs.h&lt;br /&gt;
 ! NOTE: create an 'else if' case for our core before the `endif (~line 64 in ice364-soc)&lt;br /&gt;
 ++ `elsif PE_ICEDOUBLE&lt;br /&gt;
 ++   `define ENGINE idengine&lt;br /&gt;
 $ nedit verilator.args&lt;br /&gt;
 ! NOTE: tell verilator where our core resides&lt;br /&gt;
 ++ -v ../lib/idengine.v&lt;br /&gt;
 $ cd ../lib&lt;br /&gt;
 $ ln -sf /midas/opt/nmopts/nxm/idtree/cores/idengine.v&lt;br /&gt;
 $ cd&lt;br /&gt;
 $ nedit .cshrc&lt;br /&gt;
 ! NOTE: if you're on a 32 bit machine then change JAVABITS from 64 to 32&lt;br /&gt;
 ++  setenv VERILATOR_ROOT /opt/verilator&lt;br /&gt;
 ++  setenv JAVABITS 64&lt;br /&gt;
 ++  alias xi '/midas/opt/socxxx/xilinx'&lt;br /&gt;
 $ source .cshrc&lt;br /&gt;
&lt;br /&gt;
== Creating the Example Core ==&lt;br /&gt;
In our case, we are simply copying the files to the correct directories.&lt;br /&gt;
&lt;br /&gt;
 $ nms&lt;br /&gt;
 $ nm&lt;br /&gt;
 nM&amp;gt; option/create idtree /midas/opt/nmopts/nxm/idtree&lt;br /&gt;
 nM&amp;gt; nmend&lt;br /&gt;
 $ sudo mkdir -p /opt/projects/icedouble_tutorial&lt;br /&gt;
 $ whoami&lt;br /&gt;
 xmidas&lt;br /&gt;
 $ sudo chown -R xmidas:users /opt/projects/icedouble_tutorial&lt;br /&gt;
 $ cd ~/Downloads&lt;br /&gt;
 $ cp id_tutorial_1_0_1.tgz /opt/projects/icedouble_tutorial&lt;br /&gt;
 $ cd /opt/projects/icedouble_tutorial&lt;br /&gt;
 $ tar -xvzf id_tutorial_1_0_1.tgz&lt;br /&gt;
 $ mkdir /midas/opt/nmopts/nxm/idtree/lib&lt;br /&gt;
 $ mkdir /midas/opt/nmopts/nxm/idtree/cores&lt;br /&gt;
 $ cd&lt;br /&gt;
 $ mv nmstartup.mm nmstartup.backup&lt;br /&gt;
 $ cp /opt/projects/icedouble_tutorial/nmstartup.mm .&lt;br /&gt;
 $ cp /opt/projects/icedouble_tutorial/icedouble.java /midas/opt/nmopts/nxm/idtree/prim&lt;br /&gt;
 $ cp /opt/projects/icedouble_tutorial/ICEDOUBLE.java /midas/opt/nmopts/nxm/idtree/lib&lt;br /&gt;
 $ cp /opt/projects/icedouble_tutorial/ICEDOUBLE.c /midas/opt/nmopts/nxm/idtree/lib&lt;br /&gt;
 $ cp /opt/projects/icedouble_tutorial/testicedouble.mm /midas/opt/nmopts/nxm/idtree/mcr&lt;br /&gt;
 $ cp /opt/projects/icedouble_tutorial/testicedouble.mmp /midas/opt/nmopts/nxm/idtree/mcr&lt;br /&gt;
 $ cp /opt/projects/icedouble_tutorial/idengine.v /midas/opt/nmopts/nxm/idtree/cores&lt;br /&gt;
 $ cd /midas/opt/nmopts/nxm/idtree/inc&lt;br /&gt;
 $ ln -sf /midas/opt/icexxx/inc/CoreDefs.h&lt;br /&gt;
 $ ln -sf /midas/opt/icexxx/inc/CoreProtos.h&lt;br /&gt;
 $ ln -sf /midas/opt/icexxx/inc/icecores.h&lt;br /&gt;
 $ ln -sf /midas/opt/icexxx/inc/VCore.h&lt;br /&gt;
 $ nms&lt;br /&gt;
 $ nm&lt;br /&gt;
&lt;br /&gt;
== Defining and Compiling the Core ==&lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; update icedouble&lt;br /&gt;
 Option tree (USER, SITE, UCL, etc): [IDTREE] -&amp;gt; idtree&lt;br /&gt;
 ICEDOUBLE Abbreviation: [ICEDOUBLE] -&amp;gt;&lt;br /&gt;
 Support (Any of: IPMHDOU) [M] -&amp;gt; p&lt;br /&gt;
 Number of arguments [0] -&amp;gt; 2&lt;br /&gt;
 Default (TAG=value or - to remove) 1 [] -&amp;gt; in=&lt;br /&gt;
 Default (TAG=value or - to remove) 2 [] -&amp;gt; out=&lt;br /&gt;
 22S: OPT.PATH        = IDTREE,ICE,DSP,HWC,SYS&lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; update testicedouble&lt;br /&gt;
 Option tree (USER, SITE, UCL, etc): [IDTREE] -&amp;gt; idtree&lt;br /&gt;
 TESTICEDOUBLE Abbreviation: [TESTICEDOUBLE] -&amp;gt;&lt;br /&gt;
 Support (Any of: IPMHDOU) [M] -&amp;gt;&lt;br /&gt;
 Number of arguments [0] -&amp;gt;&lt;br /&gt;
 22S: OPT.PATH        = IDTREE,ICE,DSP,HWC,SYS&lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; xi make sim ssid ICEDOUBLE&lt;br /&gt;
 nm&amp;gt; nmd lib idtree&lt;br /&gt;
 nM&amp;gt; ln -sf /midas/opt/icexxx/lib/libICEDOUBLE\$VHS_lin64.so&lt;br /&gt;
 nM&amp;gt; make all ice&lt;br /&gt;
 nM&amp;gt; make all idtree&lt;br /&gt;
 nM&amp;gt; exit&lt;br /&gt;
 $ nm&lt;br /&gt;
&lt;br /&gt;
== Running the Example ==&lt;br /&gt;
 nM&amp;gt; testicedouble&lt;br /&gt;
&lt;br /&gt;
[[Category:ICE_Cores|X]]&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
		
	</entry>
</feed>