<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wikilegacy.armadeus.com/index.php?action=history&amp;feed=atom&amp;title=Talk%3APOD_Tutorial</id>
	<title>Talk:POD Tutorial - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wikilegacy.armadeus.com/index.php?action=history&amp;feed=atom&amp;title=Talk%3APOD_Tutorial"/>
	<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Talk:POD_Tutorial&amp;action=history"/>
	<updated>2026-11-04T17:29:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Talk:POD_Tutorial&amp;diff=11544&amp;oldid=prev</id>
		<title>FabienM: Removing all content from page</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Talk:POD_Tutorial&amp;diff=11544&amp;oldid=prev"/>
		<updated>2013-01-18T17:12:48Z</updated>

		<summary type="html">&lt;p&gt;Removing all content from page&lt;/p&gt;
&lt;a href=&quot;http://wikilegacy.armadeus.com/index.php?title=Talk:POD_Tutorial&amp;amp;diff=11544&amp;amp;oldid=9743&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>FabienM</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Talk:POD_Tutorial&amp;diff=9743&amp;oldid=prev</id>
		<title>FabienM: New page: == Introduction ==  In this first tutorial, we will learn how to use POD with a simple example project for an APF9328 board. The project is described in figure 1. It is composed of 3 v...</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Talk:POD_Tutorial&amp;diff=9743&amp;oldid=prev"/>
		<updated>2011-06-17T16:06:51Z</updated>

		<summary type="html">&lt;p&gt;New page: == Introduction ==  In this first tutorial, we will learn how to use POD with a simple example project for an &lt;a href=&quot;/index.php?title=APF9328&quot; title=&quot;APF9328&quot;&gt;APF9328&lt;/a&gt; board. The project is described in figure 1. It is composed of 3 v...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In this first tutorial, we will learn how to use POD with a simple example project for an [[APF9328]] board.&lt;br /&gt;
The project is described in figure 1. It is composed of 3 virtual components:&lt;br /&gt;
*  &amp;#039;&amp;#039;&amp;#039;blink&amp;#039;&amp;#039;&amp;#039; : blink is the instance name of a led (virtual component) that can «blink» by simply writing a value in a register.&lt;br /&gt;
*  &amp;#039;&amp;#039;&amp;#039;push&amp;#039;&amp;#039;&amp;#039; : push is the instance name of a button (virtual component) that can generate an interrupt when pushed/released. The state of the button can be read in a register.&lt;br /&gt;
*  &amp;#039;&amp;#039;&amp;#039;i2c&amp;#039;&amp;#039;&amp;#039; : i2c is the instance name of the i2cocore virtual component (from OpenCores.org). This component is an i2c bus controller.&lt;br /&gt;
&lt;br /&gt;
[[image:exemple-i2cledbutton.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 1&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;Project example for tutorial&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
See [[POD installation guide]] to learn how to install it.&lt;br /&gt;
&lt;br /&gt;
== POD ==&lt;br /&gt;
&lt;br /&gt;
POD can be started by writing &amp;quot;pod&amp;quot; in the pod/bin/ directory. If you are under Windows &amp;#039;&amp;#039;python&amp;#039;&amp;#039; has to be written before:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ python pod/bin/pod&lt;br /&gt;
POD&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t want to write the entire path each time, you can set your $PATH variable with the path of POD:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export PATH=$PATH:&amp;quot;path_to_pod/pod/bin&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Playing with POD ===&lt;br /&gt;
&lt;br /&gt;
POD is a console program composed of several environments described in figure 2.&lt;br /&gt;
&lt;br /&gt;
[[image:podenvironment.png|center|frame|250px|&amp;#039;&amp;#039;&amp;#039;figure 2&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;POD console architecture&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
To enter in an environment, simply write its name from the parent environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD&amp;gt; project&lt;br /&gt;
POD.project&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a complete list of the available commands type &amp;#039;&amp;#039;help&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;pod&amp;quot;&amp;gt;&lt;br /&gt;
POD.project&amp;gt; help&lt;br /&gt;
&lt;br /&gt;
Documented commands (type help &amp;lt;topic&amp;gt;):&lt;br /&gt;
========================================&lt;br /&gt;
EOF             create         help            listplatforms   setaddr   &lt;br /&gt;
addbusclock     delcomponent   history         load            setgeneric&lt;br /&gt;
addinstance    delconnection  info            ls              shell     &lt;br /&gt;
autoconnectbus  description    intercon        printxml        simulation&lt;br /&gt;
check           driver         listcomponents  quit            synthesis &lt;br /&gt;
closeproject    eof            listinstances   savehistory     top       &lt;br /&gt;
connectbus      exit           listinterfaces  saveproject   &lt;br /&gt;
connectpin      getmapping     listmasters     selectplatform&lt;br /&gt;
&lt;br /&gt;
POD.project&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A short description is although available for each command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;pod&amp;quot;&amp;gt;&lt;br /&gt;
POD.project&amp;gt; help listcomponents&lt;br /&gt;
 listcomponents [componenttype]&lt;br /&gt;
        List components available in the library&lt;br /&gt;
        &lt;br /&gt;
POD.project&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command completion and argument completion can be done by using the &amp;lt;TAB&amp;gt; key :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project&amp;gt; help list&amp;lt;TAB&amp;gt;&lt;br /&gt;
listcomponents  listinterfaces  listplatforms   &lt;br /&gt;
listinstances   listmasters  &lt;br /&gt;
POD.project&amp;gt; help list&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System commands can be used with «!» before:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project&amp;gt; !echo &amp;quot;POD is really useful&amp;quot;&lt;br /&gt;
POD is really useful&lt;br /&gt;
POD.project&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Project creation ===&lt;br /&gt;
&lt;br /&gt;
[[image:exemple-empty.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 3&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;Empty i2cledbutton-tutorial project&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
To create a project, enter the &amp;#039;&amp;#039;create&amp;#039;&amp;#039; command in the &amp;#039;&amp;#039;project&amp;#039;&amp;#039; environment:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project&amp;gt; create i2cledbutton-tutorial&lt;br /&gt;
Project i2cledbutton-tutorial created&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;i2cledbutton-tutorial&amp;#039;&amp;#039; project is now created, you can save it &lt;br /&gt;
when you want, by typing &amp;#039;&amp;#039;saveproject&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The target platform has to be selected by means of the &amp;#039;&amp;#039;selectplatform&amp;#039;&amp;#039; command :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; selectplatform standard.apf9328&lt;br /&gt;
Component platform added as apf9328&lt;br /&gt;
Component imx9328_wb16_wrapper added as imx9328_wb16_wrapper00&lt;br /&gt;
Component rstgen_syscon added as rstgen_syscon00&lt;br /&gt;
Component irq_mngr added as irq_mngr00&lt;br /&gt;
setting base address 0x0 for  irq_mngr00.swb16&lt;br /&gt;
&lt;br /&gt;
Platform apf9328 selected&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By selecting this platform, several components will be automaticaly added by POD:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;imx9328_wb16_wrapper&amp;#039;&amp;#039;&amp;#039;: this component is used to convert the i.MX processor bus to the Wishbone (16bits data) bus.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;rstgen_syscon&amp;#039;&amp;#039;&amp;#039; : this component manages the clock and the reset for the design.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;irq_mngr&amp;#039;&amp;#039;&amp;#039; : this is a Wishbone16 slave which manages the interrupts generated by the other components and which propagates them to the processor.&lt;br /&gt;
&lt;br /&gt;
[[image:exemple-platform.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 4&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;Platform loaded with their default components&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
=== Adding components ===&lt;br /&gt;
&lt;br /&gt;
Components are organized by category in the library, to list the categories, use &amp;#039;&amp;#039;listcomponents&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; listcomponents&lt;br /&gt;
test  components  wrappers  syscons&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And to list the components under a category use &amp;#039;&amp;#039;listcomponents&amp;#039;&amp;#039; again with the category name in parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; listcomponents components&lt;br /&gt;
i2cocore  c38a_control  ledsensor  led  simplegpio  uart16550  irq_mngr  button&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Three components will be loaded with the command &amp;#039;&amp;#039;addinstances&amp;#039;&amp;#039;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; help addinstance&lt;br /&gt;
 addinstance &amp;lt;componenttype&amp;gt;.&amp;lt;componentname&amp;gt;.[componentversion] [newinstancename]&lt;br /&gt;
        Add component in project&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second parameter is used to give the instance name of the component in the project.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; addinstance components.button push&lt;br /&gt;
Component button added as push&lt;br /&gt;
&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; addinstance components.led.wb16 blink&lt;br /&gt;
Component led added as blink&lt;br /&gt;
&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; addinstance components.i2cocore.wb16 i2c&lt;br /&gt;
Component i2cocore added as i2c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: some components like the led may have several versions depending on the Wishbone bus size for example.&lt;br /&gt;
&lt;br /&gt;
[[image:exemple-components.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 4&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;Components loaded&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
=== Internal pin connections ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;push&amp;#039;&amp;#039; and &amp;#039;&amp;#039;i2c&amp;#039;&amp;#039; components have output pins to generate interrupts. These pins have&lt;br /&gt;
to be connected to the interrupt manager &amp;quot;irq_mngr00&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:exemple-intconnection.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 5&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;Internal interrupts connections&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
A complete description of an instance in the project can be displayed with the &amp;#039;&amp;#039;info&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; info i2c&lt;br /&gt;
Component name :i2c&lt;br /&gt;
Instance  name :i2cocore&lt;br /&gt;
description : A simple button ip&lt;br /&gt;
-&amp;gt;Generics&lt;br /&gt;
             id : 1&lt;br /&gt;
        wb_size : 16&lt;br /&gt;
-&amp;gt;Interfaces&lt;br /&gt;
irq             :&lt;br /&gt;
     inta_o          s1&lt;br /&gt;
candr           :&lt;br /&gt;
     rst_i           s1&lt;br /&gt;
     clk_i           s1&lt;br /&gt;
i2c             :&lt;br /&gt;
     scl             s1&lt;br /&gt;
     sda             s1&lt;br /&gt;
swb16            Base address:0x0&lt;br /&gt;
     adr_i           s4&lt;br /&gt;
     dat_i           s16&lt;br /&gt;
     dat_o           s16&lt;br /&gt;
     we_i            s1&lt;br /&gt;
     stb_i           s1&lt;br /&gt;
     ack_o           s1&lt;br /&gt;
     cyc_i           s1&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command gives the interfaces, the ports and the size of the ports (s1, s16, ...). We want to &lt;br /&gt;
connect the interrupt port pin number 0, named &amp;#039;&amp;#039;&amp;#039;inta_o&amp;#039;&amp;#039;&amp;#039; and part of the &amp;#039;&amp;#039;&amp;#039;irq&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
interface, to the &amp;#039;&amp;#039;irq_mngr00&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; info irq_mngr00&lt;br /&gt;
Component name :irq_mngr00&lt;br /&gt;
Instance  name :irq_mngr&lt;br /&gt;
description : Manage interruptions.&lt;br /&gt;
-&amp;gt;Generics&lt;br /&gt;
             id : 1&lt;br /&gt;
      irq_level : &amp;#039;1&amp;#039;&lt;br /&gt;
      irq_count : 1&lt;br /&gt;
-&amp;gt;Interfaces&lt;br /&gt;
candr           :&lt;br /&gt;
     gls_clk         s1&lt;br /&gt;
     gls_reset       s1&lt;br /&gt;
swb16            Base address:0x0&lt;br /&gt;
     wbs_s1_address  s2&lt;br /&gt;
     wbs_s1_readdata s16&lt;br /&gt;
     wbs_s1_writedata s16&lt;br /&gt;
     wbs_s1_ack      s1&lt;br /&gt;
     wbs_s1_strobe   s1&lt;br /&gt;
     wbs_s1_cycle    s1&lt;br /&gt;
     wbs_s1_write    s1&lt;br /&gt;
irq             :&lt;br /&gt;
     irqport         s16&lt;br /&gt;
ext_irq         :&lt;br /&gt;
     gls_irq         s1&lt;br /&gt;
        pin 0: -&amp;gt; apf9328.fpga.TIM1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The targeted port in the irq_mngr is &amp;#039;&amp;#039;&amp;#039;irqport&amp;#039;&amp;#039;&amp;#039; part of the &amp;#039;&amp;#039;&amp;#039;irq&amp;#039;&amp;#039;&amp;#039; interface. To establish the connection, the &amp;#039;&amp;#039;connectpin&amp;#039;&amp;#039; command will be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; connectpin irq_mngr00.irq.irqport.0 i2c.irq.inta_o.0&lt;br /&gt;
pin connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same thing for the push button :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; connectpin irq_mngr00.irq.irqport.1 push.int_button.irq.0&lt;br /&gt;
pin connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;info&amp;#039;&amp;#039; command can be used to verify that the connection is correctly performed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; info irq_mngr00&lt;br /&gt;
Component name :irq_mngr00&lt;br /&gt;
Instance  name :irq_mngr&lt;br /&gt;
description : Manage interruptions.&lt;br /&gt;
-&amp;gt;Generics&lt;br /&gt;
             id : 1&lt;br /&gt;
      irq_level : &amp;#039;1&amp;#039;&lt;br /&gt;
      irq_count : 2&lt;br /&gt;
-&amp;gt;Interfaces&lt;br /&gt;
candr           :&lt;br /&gt;
     gls_clk         s1&lt;br /&gt;
     gls_reset       s1&lt;br /&gt;
swb16            Base address:0x0&lt;br /&gt;
     wbs_s1_address  s2&lt;br /&gt;
     wbs_s1_readdata s16&lt;br /&gt;
     wbs_s1_writedata s16&lt;br /&gt;
     wbs_s1_ack      s1&lt;br /&gt;
     wbs_s1_strobe   s1&lt;br /&gt;
     wbs_s1_cycle    s1&lt;br /&gt;
     wbs_s1_write    s1&lt;br /&gt;
irq             :&lt;br /&gt;
     irqport         s16&lt;br /&gt;
        pin 0: -&amp;gt; i2c.irq.inta_o.0&lt;br /&gt;
        pin 1: -&amp;gt; push.int_button.irq.0&lt;br /&gt;
ext_irq         :&lt;br /&gt;
     gls_irq         s1&lt;br /&gt;
        pin 0: -&amp;gt; apf9328.fpga.TIM1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== External pin connections ===&lt;br /&gt;
&lt;br /&gt;
Connecting an external pin is done the same way as for an internal pin by giving the name of the platform in place of the instance name. In the &amp;#039;&amp;#039;&amp;#039;apf9328&amp;#039;&amp;#039;&amp;#039; platform, the pin name &lt;br /&gt;
can be found in FPGA schematic [http://www.armadeus.com/_downloads/apf9328/hardware/apf_schema.pdf] (page 13). &lt;br /&gt;
The name of the interface is &amp;#039;&amp;#039;&amp;#039;fpga&amp;#039;&amp;#039;&amp;#039; for the apf9328. In this example we will connect the button, the led and the i2c to the APF9328DevFull connector X7 (figure 6). &lt;br /&gt;
&lt;br /&gt;
[[image:devfullX7.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 5&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;X7 connector&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
We just have to connect the pins as following :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; connectpin apf9328.fpga.IO_L01N_0 push.int_button.button.0&lt;br /&gt;
pin connected&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; connectpin i2c.i2c.sda apf9328.fpga.IO_L32N_0&lt;br /&gt;
pin connected&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; connectpin i2c.i2c.scl apf9328.fpga.IO_L01P_0&lt;br /&gt;
pin connected&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; connectpin blink.int_led.led.0 apf9328.fpga.IO_L32P_0&lt;br /&gt;
pin connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:exemple-extconnection.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 6&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;external connections&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
=== Bus and clock connections ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bus&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[image:exemple-busconnection.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 7&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;Wishbone bus connections&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To connect a bus, the master bus interface is used as first argument of the &amp;#039;&amp;#039;connectbus&amp;#039;&amp;#039; command, the second argument being the slave bus interface:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; connectbus imx9328_wb16_wrapper00.mwb16 blink.swb16&lt;br /&gt;
Bus connected&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; connectbus imx9328_wb16_wrapper00.mwb16 push.swb16&lt;br /&gt;
Bus connected&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; connectbus imx9328_wb16_wrapper00.mwb16 i2c.swb16&lt;br /&gt;
Bus connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;clock&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[image:exemple-clockconnection.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 8&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;Syscon connection&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The bus interconection (Intercon) need to be synchronized with a clock and reset generator. This can be done by means of the &amp;#039;&amp;#039;addbusclock&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; addbusclock rstgen_syscon00.candr imx9328_wb16_wrapper00.mwb16&lt;br /&gt;
Connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;autoconnect&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Bus and clock connections can be automaticaly performed with the &amp;#039;&amp;#039;autoconnect&amp;#039;&amp;#039; command. This command works only for &amp;quot;classical&amp;quot; architectures and with recognized buses.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; autoconnectbus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Intercon generation ===&lt;br /&gt;
&lt;br /&gt;
Once the connections done, the Intercon component has to be generated. The Intercon is a component&lt;br /&gt;
responsible for decoding the addresses and for routing the Wishbone bus signals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; intercon imx9328_wb16_wrapper00.mwb16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:exemple-intercon.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 8&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;Intercon&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
=== Top generation ===&lt;br /&gt;
&lt;br /&gt;
[[image:exemple-top.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 9&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;Top&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
The Top component is the component responsible for connecting the non Wishbone signals in the FPGA. The Top can be generated with the &amp;#039;&amp;#039;top&amp;#039;&amp;#039; command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; top&lt;br /&gt;
&lt;br /&gt;
Top generated with name : top_i2cledbutton-tutorial.vhd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Synthesis ==&lt;br /&gt;
&lt;br /&gt;
In the &amp;#039;&amp;#039;&amp;#039;apf9328&amp;#039;&amp;#039;&amp;#039; platform, the FPGA is a Spartan3 from Xilinx. This means that the synthesis of the project can only be done with ISE. Fortunately, Xilinx provides the ISE &lt;br /&gt;
Webpack freely on its website [http://www.xilinx.com/ise/logic_design_prod/webpack.htm].&lt;br /&gt;
&lt;br /&gt;
POD has to generate a project that ISE can understand. This can be accomplished from the synthesis environment :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial&amp;gt; synthesis&lt;br /&gt;
POD.project.synthesis&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the tool used for the synthesis has to be specified with the &amp;#039;&amp;#039;selecttoolchain&amp;#039;&amp;#039; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project.synthesis&amp;gt; selecttoolchain ise&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that we can generate an ISE project with the &amp;#039;&amp;#039;generateproject&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton-tutorial.synthesis&amp;gt; selecttoolchain ise&lt;br /&gt;
POD.project:i2cledbutton-tutorial.synthesis&amp;gt; generateproject&lt;br /&gt;
Make directory for imx9328_wb16_wrapper&lt;br /&gt;
Make directory for rstgen_syscon&lt;br /&gt;
Make directory for irq_mngr&lt;br /&gt;
Make directory for led&lt;br /&gt;
Make directory for button&lt;br /&gt;
Make directory for i2cocore&lt;br /&gt;
Make directory for imx9328_wb16_wrapper00_mwb16&lt;br /&gt;
&lt;br /&gt;
Constraint file generated with name :~/pod/tests/i2cledbutton-tutorial/synthesis/i2cledbutton-tutorial.ucf&lt;br /&gt;
&lt;br /&gt;
TCL script generated with name : i2cledbutton-tutorial.tcl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, POD generates although a TCL script that can be executed by ISE. This script eases the synthesis process. &lt;br /&gt;
&lt;br /&gt;
[[image:exemple-ise.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 10&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;Bitstream generation with ISE Webpack&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
In the Tcl tab (&amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039;), change the default directory to the synthesis directory (&amp;#039;&amp;#039;&amp;#039;2&amp;#039;&amp;#039;&amp;#039;), find the tcl script you want to execute (&amp;#039;&amp;#039;&amp;#039;3&amp;#039;&amp;#039;&amp;#039;, under Windows type &amp;#039;&amp;#039;dir&amp;#039;&amp;#039; instead of &amp;#039;&amp;#039;ls&amp;#039;&amp;#039;) and start it with the &amp;#039;&amp;#039;source&amp;#039;&amp;#039; command (&amp;#039;&amp;#039;&amp;#039;4&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
The resulting bitstream (binary FPGA synthetized code) &amp;#039;&amp;#039;top_i2cledbutton.bit&amp;#039;&amp;#039; can be found in the &amp;#039;&amp;#039;i2cledbutton_tutorial/objs&amp;#039;&amp;#039; directory.&lt;br /&gt;
&lt;br /&gt;
== Simulation ==&lt;br /&gt;
&lt;br /&gt;
If a simulation is required, POD can generate a template for the whole project. To do this, enter in the simulation environment :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton_tutorial&amp;gt; simulation&lt;br /&gt;
POD.project:i2cledbutton_tutorial.simulation&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To generate the testbench and the makefile use the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton_tutorial.simulation&amp;gt; generateproject&lt;br /&gt;
&lt;br /&gt;
Testbench with name : /home/fabien/projectpod/software/pod/tests/i2cledbutton_tutorial/simulation/top_i2cledbutton_tutorial_tb.vhd Done&lt;br /&gt;
&lt;br /&gt;
Makefile generated with name : /home/fabien/projectpod/software/pod/tests/i2cledbutton_tutorial/simulation/Makefile Done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you just have to modify the &amp;#039;&amp;#039;top_i2cledbutton_tutorial_tb.vhd&amp;#039;&amp;#039; file to add your own tests &lt;br /&gt;
under the &amp;#039;&amp;#039;stimulis&amp;#039;&amp;#039; process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
stimulis : process&lt;br /&gt;
begin&lt;br /&gt;
-- write stimulis here&lt;br /&gt;
wait for 10 us;&lt;br /&gt;
assert false report &amp;quot;End of test&amp;quot; severity error;&lt;br /&gt;
end process stimulis;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then start the simulation with &amp;#039;&amp;#039;make ghdl-simu&amp;#039;&amp;#039; and launch &amp;#039;&amp;#039;make ghdl-view&amp;#039;&amp;#039; to &lt;br /&gt;
view the generated chronograms with gtkwave.&lt;br /&gt;
&lt;br /&gt;
== Drivers ==&lt;br /&gt;
&lt;br /&gt;
Numbers of components have a driver template for different operating systems. POD can&lt;br /&gt;
fill these templates with the informations contained in the project.&lt;br /&gt;
&lt;br /&gt;
From the driver environment,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton_tutorial&amp;gt; driver&lt;br /&gt;
POD.project:i2cledbutton_tutorial.driver&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
choose the targeted platform:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton_tutorial.driver&amp;gt; selecttoolchain armadeus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And generate the driver project : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton_tutorial.driver&amp;gt; generateproject&lt;br /&gt;
No driver for imx9328_wb16_wrapper&lt;br /&gt;
No driver for rstgen_syscon&lt;br /&gt;
Create directory for irq_mngr driver&lt;br /&gt;
Create directory for button driver&lt;br /&gt;
Create directory for led driver&lt;br /&gt;
Create directory for i2cocore driver&lt;br /&gt;
No driver for imx9328_wb16_wrapper00_mwb16&lt;br /&gt;
Copy and fill template for irq_mngr&lt;br /&gt;
Copy and fill template for button&lt;br /&gt;
Copy and fill template for led&lt;br /&gt;
Copy and fill template for i2cocore&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Drivers are generated and can be found in the &amp;#039;&amp;#039;i2cledbutton_tutorial/drivers/&amp;#039;&amp;#039; directory. &lt;br /&gt;
POD can copy this drivers to the right place in the software development tree. Select the path with &amp;#039;&amp;#039;selectprojecttree&amp;#039;&amp;#039; then copy the files with &amp;#039;&amp;#039;copydrivers&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
POD.project:i2cledbutton_tutorial.driver&amp;gt; selectprojecttree ~/armadeus/target/linux/modules/fpga/POD&lt;br /&gt;
&lt;br /&gt;
POD.project:i2cledbutton_tutorial.driver&amp;gt; copydrivers&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To compile the drivers, go to your &amp;#039;&amp;#039;armadeus/&amp;#039;&amp;#039; directory then type &amp;#039;&amp;#039;make linux26-menuconfig&amp;#039;&amp;#039;. The drivers generated by POD are located in &amp;#039;&amp;#039;Device Drivers - Armadeus specific drivers - FPGA drivers &amp;#039;&amp;#039; (see figure 11).&lt;br /&gt;
&lt;br /&gt;
[[image:exemple-linuxmenuconfig.png|center|frame|400px|&amp;#039;&amp;#039;&amp;#039;figure 11&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;Linux menuconfig&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;host&amp;quot;&amp;gt;&lt;br /&gt;
$ make linux-menuconfig&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:POD]]&lt;/div&gt;</summary>
		<author><name>FabienM</name></author>
	</entry>
</feed>