<?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=CORE_ICE</id>
	<title>CORE ICE - 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=CORE_ICE"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=CORE_ICE&amp;action=history"/>
	<updated>2026-04-08T04:11:25Z</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=CORE_ICE&amp;diff=491&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;The Core class in nxm.ice.lib provides the standard framework for developing a Java callable Core. The wrappers for each hardware implementation are auto-generated by the inne...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=CORE_ICE&amp;diff=491&amp;oldid=prev"/>
		<updated>2020-04-14T15:04:33Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The Core class in nxm.ice.lib provides the standard framework for developing a Java callable Core. The wrappers for each hardware implementation are auto-generated by the inne...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The Core class in nxm.ice.lib provides the standard framework for developing a Java callable Core. The wrappers for each hardware implementation are auto-generated by the inner class definitions in the Java reference class.&lt;br /&gt;
&lt;br /&gt;
The Foo.v code contains the Verilog implementation of the Core. It is used for both the VHS and ICE implementations.&lt;br /&gt;
The Xilinx ISE or Xflow can be used to generate the bit file to be loaded into the ICE processor module.&lt;br /&gt;
The Xilinx script provided in the ICE Toolkit's -soc zip file option uses the xflow process to automate compilation of designs.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
  unix&amp;gt; alias xi $ICEROOT/code/soc/xilinx&lt;br /&gt;
  unix&amp;gt; xi make v6m hhu 1 USER&lt;br /&gt;
&lt;br /&gt;
will compile the cores defined in the $ICEROOT/code/soc/v6m/mdefs.h file's PE_USER branch and create the download file $ICEROOT/dat/icev6m_hhu.prm which can be loaded into the processor module by resetting the card with the &amp;lt;code&amp;gt;PMFPGA=u&amp;lt;/code&amp;gt; flag.  The &amp;lt;code&amp;gt;hh&amp;lt;/code&amp;gt; in the signature is automatic for processor modules mounted on PIC5 and later cards.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Here is an example Verilog implementation of the noop function contained in the file noopengine.v:&lt;br /&gt;
&lt;br /&gt;
  /*&lt;br /&gt;
    Noop FPGA Core&lt;br /&gt;
  &lt;br /&gt;
  */&lt;br /&gt;
  module noopengine (sclk,srst, scs,saddr, swr,swrbus, srd,srdbus, sack,&lt;br /&gt;
                     ioclk, istat,iena,isel,ibus, ostat,oena,osel,obus, test);&lt;br /&gt;
  &lt;br /&gt;
    parameter PORT=1;     // engine index&lt;br /&gt;
    parameter IBW=64;     // I/O bus width - 32b in processor modules, 64b in main boards (PIC5)&lt;br /&gt;
    parameter SBW=32;     // System bus width - always 32&lt;br /&gt;
  &lt;br /&gt;
    localparam DBW=32;    // Data bus width (internal core use)&lt;br /&gt;
  &lt;br /&gt;
    input sclk;           // system clock&lt;br /&gt;
    input srst;           // system reset&lt;br /&gt;
    input scs;            // system select (qualifies swr and srd for this core)&lt;br /&gt;
    input swr;            // register write&lt;br /&gt;
    input srd;            // register read&lt;br /&gt;
    input [31:0] saddr;   // register address&lt;br /&gt;
    input [31:0] swrbus;  // register data&lt;br /&gt;
    output [31:0] srdbus; // register data&lt;br /&gt;
    output sack;          // acknowledge&lt;br /&gt;
  &lt;br /&gt;
    input ioclk;          // I/O data bus clock&lt;br /&gt;
    output istat;         // istat - ready to accept 64 by burst&lt;br /&gt;
    input iena;           // input enable (one cycle early) (continuous 64 byte burst)&lt;br /&gt;
    input [7:0] isel;     // input channel selection&lt;br /&gt;
    input [IBW-1:0] ibus; // input data bus&lt;br /&gt;
    output ostat;         // ostat - ready to provide 64 byte burst&lt;br /&gt;
    input oena;           // output enable (one cycle early) (continuous 64 byte burst)&lt;br /&gt;
    output [7:0] osel;    // output channel selection&lt;br /&gt;
    output [IBW-1:0] obus;// output data bus&lt;br /&gt;
  &lt;br /&gt;
    output [7:0] test;    // 8 test signals for scope probes&lt;br /&gt;
  &lt;br /&gt;
    wire L=0, H=1;&lt;br /&gt;
    assign sack=H;&lt;br /&gt;
    assign osel=0;        // single channel core&lt;br /&gt;
  &lt;br /&gt;
    // system register address resolution - with pipeline&lt;br /&gt;
    wire [7:0] sb; swrbank #(0,8) swb (sclk,scs,swr,saddr,sb);&lt;br /&gt;
    wire swrsys  = sb[0]; // system register (required)&lt;br /&gt;
    wire swrdec  = sb[1]; // decimation register (optional)&lt;br /&gt;
    wire swrgain = sb[2]; // gain register (optional)&lt;br /&gt;
    wire swrfreq = sb[3]; // freq register (optional&lt;br /&gt;
    wire swrflag = sb[7]; // flag register (optional)&lt;br /&gt;
  &lt;br /&gt;
    // system registers - written to by pic_cport() host control software&lt;br /&gt;
    reg [31:0] system,dec,gain;&lt;br /&gt;
    always @(posedge sclk) begin&lt;br /&gt;
      if (srst) system &amp;lt;= 0; else if (swrsys) system &amp;lt;= swrbus;&lt;br /&gt;
      if (srst) dec    &amp;lt;= 0; else if (swrdec) dec    &amp;lt;= swrbus;&lt;br /&gt;
    end&lt;br /&gt;
    wire enable     = system[0];          // core enable&lt;br /&gt;
    wire dir        = system[1];          // direction ? output:input&lt;br /&gt;
    wire reduce     = system[2];          // reduction ? enable:disable&lt;br /&gt;
    wire [3:0] ifmt = system[11:8];       // input format  bit[2:0]? 0=16b 1=8b 2=4b 3=1b 4=32b  bit[3]?complex:real&lt;br /&gt;
    wire [3:0] ofmt = system[15:12];      // output format bit[2:0]? 0=16b 1=8b 2=4b 3=1b 4=32b  bit[3]?complex:real&lt;br /&gt;
  &lt;br /&gt;
    wire reset = !enable;         // core reset (at boot or disabled)&lt;br /&gt;
    wire vena,wena,vstat,wstat;&lt;br /&gt;
    wire [DBW-1:0] vbus,wbus;&lt;br /&gt;
  &lt;br /&gt;
    reg ival; always @(posedge ioclk) ival &amp;lt;= iena; // handle iena early&lt;br /&gt;
  &lt;br /&gt;
    // this reformats any input type to output format 4'h8 = complex 16b&lt;br /&gt;
    fifoNxMfmt #(IBW,DBW) fi (ioclk,reset, ifmt,istat,ival,ibus, sclk,reset, 4'h8, vstat,vena,vbus);&lt;br /&gt;
  &lt;br /&gt;
    // example function - replace with call to user verilog or vhdl here&lt;br /&gt;
    noop inst (sclk,reset,reduce,dec, vstat,vena,vbus, wstat,wena,wbus);&lt;br /&gt;
  &lt;br /&gt;
    // this reformats the 4'h8 = complex 16b to any output type&lt;br /&gt;
    fifoNxMfmti #(IBW,DBW) fo (ioclk,reset, ofmt,ostat,oena,obus, sclk,reset, 4'h8, wstat,wena,wbus);&lt;br /&gt;
  &lt;br /&gt;
    spram #(2,32,0) rs (sclk,scs, saddr[10:2],swr, swrbus,srdbus); // example readback 2kB ram&lt;br /&gt;
  &lt;br /&gt;
    assign test = {oena,ostat,iena,istat,wena,vena,dir,reset};    // example test probe&lt;br /&gt;
  &lt;br /&gt;
  endmodule&lt;br /&gt;
&lt;br /&gt;
The above code is the ICE system interface and dataflow engine.&lt;br /&gt;
It handles the system register interface, as well as the dataflow buffering and reformatting.  &lt;br /&gt;
The specific functional code should be kept separate to allow the function to migrate easily to other frameworks. &lt;br /&gt;
The following block contains the decimation function handled by the Noop core:&lt;br /&gt;
&lt;br /&gt;
 module noop (clk,reset,reduce,dec, vstat,vena,vbus, wstat,wena,wbus);&lt;br /&gt;
   input clk,reset,reduce;&lt;br /&gt;
   input [31:0] dec;&lt;br /&gt;
   input vstat,wstat;&lt;br /&gt;
   output vena,wena;&lt;br /&gt;
   input [31:0] vbus;&lt;br /&gt;
   output [31:0] wbus;&lt;br /&gt;
 &lt;br /&gt;
   // example noop with dec = decimation-1&lt;br /&gt;
   reg [9:0] count;&lt;br /&gt;
   reg vena,vval;&lt;br /&gt;
   wire zero = (count==0);&lt;br /&gt;
   wire load = (vena &amp;amp;&amp;amp; zero);&lt;br /&gt;
   always @(posedge clk) begin&lt;br /&gt;
     if (reset) count &amp;lt;= 0; else if (load) count &amp;lt;= dec[9:0]; else if (vena) count &amp;lt;= count-1;&lt;br /&gt;
     vena &amp;lt;= vstat &amp;amp;&amp;amp; wstat &amp;amp;&amp;amp; !reset;&lt;br /&gt;
     vval &amp;lt;= vena &amp;amp;&amp;amp; (zero || !reduce);&lt;br /&gt;
   end&lt;br /&gt;
   assign wena = vval;&lt;br /&gt;
   assign wbus = vbus;&lt;br /&gt;
 &lt;br /&gt;
 endmodule&lt;br /&gt;
&lt;br /&gt;
[[Category:ICE_Cores|4]]&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
		
	</entry>
</feed>