Commit 52c113cd authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana Committed by Tomasz Wlostowski

Updated some documentation files

Signed-off-by: Theodor-Adrian Stana's avatarTheodor Stana <t.stana@cern.ch>
Signed-off-by: Tomasz Wlostowski's avatarTomasz Włostowski <tomasz.wlostowski@cern.ch>
parent b7786ef6
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="896.07611"
height="315.85431"
id="svg3820"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="New document 5">
<defs
id="defs3822" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="530.67784"
inkscape:cy="281.42393"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1855"
inkscape:window-height="1176"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid4192"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
units="mm"
spacingx="1mm"
spacingy="1mm"
originx="-5.1779689mm"
originy="-204.92945mm" />
</sodipodi:namedview>
<metadata
id="metadata3825">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-18.347134,-10.379911)">
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="35.433064"
y="81.496033"
id="text3904"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
x="35.433064"
y="81.496033"
style="font-size:12px;font-weight:bold;text-align:center;text-anchor:middle"
id="tspan3908">read</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="102.7559"
y="21.259825"
id="text3900"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan3902"
x="102.7559"
y="21.259825">BIT 7</tspan><tspan
id="tspan3948"
sodipodi:role="line"
x="102.7559"
y="33.759827">- bit_cnt++</tspan><tspan
sodipodi:role="line"
x="102.7559"
y="46.259827"
id="tspan3912">- shift in SDA</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3914"
width="70.866142"
height="38.976383"
x="99.212593"
y="10.629911" />
<text
sodipodi:linespacing="125%"
id="text3950"
y="21.259825"
x="191.33859"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="21.259825"
x="191.33859"
id="tspan3952"
sodipodi:role="line"
style="font-weight:bold">BIT 6</tspan><tspan
y="33.759827"
x="191.33859"
sodipodi:role="line"
id="tspan3954">- bit_cnt++</tspan><tspan
id="tspan3956"
y="46.259827"
x="191.33859"
sodipodi:role="line">- shift in SDA</tspan></text>
<rect
y="10.629911"
x="187.79529"
height="38.976383"
width="70.866142"
id="rect3958"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="279.92126"
y="21.259825"
id="text3962"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan3964"
x="279.92126"
y="21.259825">BIT 5</tspan><tspan
id="tspan3966"
sodipodi:role="line"
x="279.92126"
y="33.759827">- bit_cnt++</tspan><tspan
sodipodi:role="line"
x="279.92126"
y="46.259827"
id="tspan3968">- shift in SDA</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3970"
width="70.866142"
height="38.976383"
x="276.37793"
y="10.629911" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 99.212589,49.606279 0,24.80315"
id="path3922"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path3960"
d="m 187.79526,49.606279 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 276.37793,49.606279 0,24.80315"
id="path3972"
inkscape:connector-curvature="0" />
<g
transform="translate(17.716525,-17.716531)"
id="g3984">
<path
inkscape:connector-curvature="0"
id="path5749"
d="m 35.433081,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.716539,0 17.71653,35.433066 35.43307,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 124.01576,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
id="path3838"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 212.59842,113.3858 35.43307,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
id="path3840"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path3842"
d="m 301.18111,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 389.76378,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
id="path3844"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path3846"
d="m 478.34646,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path3848"
d="m 566.92912,113.3858 35.43307,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 655.51181,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
id="path3850"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path3982"
d="m 744.0945,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<rect
y="10.629911"
x="364.96063"
height="38.976383"
width="70.866142"
id="rect4050"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<path
inkscape:connector-curvature="0"
id="path4052"
d="m 364.96061,49.606279 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<text
sodipodi:linespacing="125%"
id="text4064"
y="21.259825"
x="368.50397"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="21.259825"
x="368.50397"
id="tspan4066"
sodipodi:role="line"
style="font-weight:bold">BIT 4</tspan><tspan
y="33.759827"
x="368.50397"
sodipodi:role="line"
id="tspan4068">- bit_cnt++</tspan><tspan
id="tspan4070"
y="46.259827"
x="368.50397"
sodipodi:role="line">- shift in SDA</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4072"
width="70.866142"
height="38.976383"
x="453.54327"
y="10.629911" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 453.54327,49.606279 0,24.80315"
id="path4074"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="457.08661"
y="21.259825"
id="text4078"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4080"
x="457.08661"
y="21.259825">BIT 3</tspan><tspan
id="tspan4082"
sodipodi:role="line"
x="457.08661"
y="33.759827">- bit_cnt++</tspan><tspan
sodipodi:role="line"
x="457.08661"
y="46.259827"
id="tspan4084">- shift in SDA</tspan></text>
<rect
y="10.629911"
x="542.12592"
height="38.976383"
width="70.866142"
id="rect4086"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<path
inkscape:connector-curvature="0"
id="path4088"
d="m 542.126,49.606279 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<text
sodipodi:linespacing="125%"
id="text4092"
y="21.259825"
x="545.66925"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="21.259825"
x="545.66925"
id="tspan4094"
sodipodi:role="line"
style="font-weight:bold">BIT 2</tspan><tspan
y="33.759827"
x="545.66925"
sodipodi:role="line"
id="tspan4096">- bit_cnt++</tspan><tspan
id="tspan4098"
y="46.259827"
x="545.66925"
sodipodi:role="line">- shift in SDA</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4100"
width="70.866142"
height="38.976383"
x="630.70856"
y="10.629911" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 630.70865,49.606279 0,24.80315"
id="path4102"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="634.25189"
y="21.259825"
id="text4106"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4108"
x="634.25189"
y="21.259825">BIT 1</tspan><tspan
id="tspan4110"
sodipodi:role="line"
x="634.25189"
y="33.759827">- bit_cnt++</tspan><tspan
sodipodi:role="line"
x="634.25189"
y="46.259827"
id="tspan4112">- shift in SDA</tspan></text>
<rect
y="10.629911"
x="719.2912"
height="38.976383"
width="70.866142"
id="rect4114"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<path
inkscape:connector-curvature="0"
id="path4116"
d="m 719.29132,49.606279 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<text
sodipodi:linespacing="125%"
id="text4120"
y="21.259825"
x="722.83453"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="21.259825"
x="722.83453"
id="tspan4122"
sodipodi:role="line"
style="font-weight:bold">BIT 0</tspan><tspan
y="33.759827"
x="722.83453"
sodipodi:role="line"
id="tspan4124">- bit_cnt++</tspan><tspan
id="tspan4126"
y="46.259827"
x="722.83453"
sodipodi:role="line">- shift in SDA</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 843.30707,81.496049 0,24.803151"
id="path4130"
inkscape:connector-curvature="0" />
<rect
y="106.29919"
x="843.30707"
height="31.889772"
width="70.866119"
id="rect4132"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="846.8504"
y="116.92914"
id="text4134"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4136"
x="846.8504"
y="116.92914">ACK BIT</tspan><tspan
sodipodi:role="line"
x="846.8504"
y="129.42914"
id="tspan4140">- check ack_i</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="751.18103"
y="116.92914"
id="text4565"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4567"
x="751.18103"
y="116.92914">BIT 0</tspan><tspan
sodipodi:role="line"
x="751.18103"
y="129.42914"
id="tspan4687">- shift out ack_i</tspan><tspan
sodipodi:role="line"
x="751.18103"
y="141.92914"
id="tspan4573">- set r_done_p_o</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4575"
width="88.58268"
height="42.51968"
x="747.63776"
y="106.29919" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 747.63778,67.322799 10e-6,38.976411"
id="path4577"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<g
transform="translate(17.716536,-17.716526)"
id="g3272">
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="17.716536"
y="276.37793"
id="text4144"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
x="17.716536"
y="276.37793"
style="font-size:12px;font-weight:bold;text-align:center;text-anchor:middle"
id="tspan4146">write</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="120.47244"
y="311.81097"
id="text4148"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4150"
x="120.47244"
y="311.81097">BIT 7</tspan><tspan
sodipodi:role="line"
x="120.47244"
y="324.31097"
id="tspan4154">- shift out SDA</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4156"
width="77.952751"
height="28.346464"
x="116.92914"
y="301.18106" />
<text
sodipodi:linespacing="125%"
id="text4283"
y="311.81097"
x="209.05511"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="311.81097"
x="209.05511"
id="tspan4285"
sodipodi:role="line"
style="font-weight:bold">BIT 6</tspan><tspan
id="tspan4287"
y="324.31097"
x="209.05511"
sodipodi:role="line">- shift out SDA</tspan></text>
<rect
y="301.18106"
x="205.51181"
height="28.346464"
width="77.952751"
id="rect4289"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="297.63779"
y="311.81097"
id="text4293"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4295"
x="297.63779"
y="311.81097">BIT 5</tspan><tspan
sodipodi:role="line"
x="297.63779"
y="324.31097"
id="tspan4297">- shift out SDA</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4299"
width="77.952751"
height="28.346464"
x="294.09448"
y="301.18106" />
<text
sodipodi:linespacing="125%"
id="text4303"
y="311.81097"
x="386.22049"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="311.81097"
x="386.22049"
id="tspan4305"
sodipodi:role="line"
style="font-weight:bold">BIT 4</tspan><tspan
id="tspan4307"
y="324.31097"
x="386.22049"
sodipodi:role="line">- shift out SDA</tspan></text>
<rect
y="301.18106"
x="382.67719"
height="28.346464"
width="77.952751"
id="rect4309"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
sodipodi:linespacing="125%"
id="text4313"
y="311.81097"
x="474.80316"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="311.81097"
x="474.80316"
id="tspan4315"
sodipodi:role="line"
style="font-weight:bold">BIT 3</tspan><tspan
id="tspan4317"
y="324.31097"
x="474.80316"
sodipodi:role="line">- shift out SDA</tspan></text>
<rect
y="301.18106"
x="471.25986"
height="28.346464"
width="77.952751"
id="rect4319"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="563.3858"
y="311.81097"
id="text4321"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4323"
x="563.3858"
y="311.81097">BIT 2</tspan><tspan
sodipodi:role="line"
x="563.3858"
y="324.31097"
id="tspan4325">- shift out SDA</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4327"
width="77.952751"
height="28.346464"
x="559.84247"
y="301.18106" />
<text
sodipodi:linespacing="125%"
id="text4329"
y="311.81097"
x="651.96844"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="311.81097"
x="651.96844"
id="tspan4331"
sodipodi:role="line"
style="font-weight:bold">BIT 1</tspan><tspan
id="tspan4333"
y="324.31097"
x="651.96844"
sodipodi:role="line">- shift out SDA</tspan></text>
<rect
y="301.18106"
x="648.42517"
height="28.346464"
width="77.952751"
id="rect4335"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="733.46454"
y="311.81097"
id="text4337"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4339"
x="733.46454"
y="311.81097">BIT 0</tspan><tspan
sodipodi:role="line"
x="733.46454"
y="324.31097"
id="tspan4341">- shift out SDA</tspan><tspan
sodipodi:role="line"
x="733.46454"
y="336.81097"
id="tspan4355">- set w_done_p_o</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4343"
width="92.125977"
height="42.519688"
x="729.92126"
y="301.18106" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 116.92913,276.37793 0,24.80315"
id="path4178"
inkscape:connector-curvature="0" />
<g
transform="translate(0,177.16535)"
id="g4184">
<path
inkscape:connector-curvature="0"
id="path4186"
d="m 35.433081,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.716539,0 17.71653,35.433066 35.43307,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 124.01576,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
id="path4188"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 212.59842,113.3858 35.43307,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
id="path4190"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4192"
d="m 301.18111,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 389.76378,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
id="path4194"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4196"
d="m 478.34646,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4198"
d="m 566.92912,113.3858 35.43307,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 655.51181,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
id="path4200"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4202"
d="m 744.0945,113.3858 35.43306,0 0,0 17.71653,-35.433066 17.71654,0 17.71653,35.433066 35.43307,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 825.59055,276.37793 0,24.80315"
id="path4264"
inkscape:connector-curvature="0" />
<rect
y="301.18106"
x="825.59058"
height="38.976383"
width="70.866119"
id="rect4266"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="829.13391"
y="311.811"
id="text4268"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4270"
x="829.13391"
y="311.811">ACK BIT</tspan><tspan
sodipodi:role="line"
x="829.13391"
y="324.311"
id="tspan4272">- check ACK </tspan><tspan
id="tspan4357"
sodipodi:role="line"
x="829.13391"
y="336.811">from master</tspan></text>
<path
inkscape:connector-curvature="0"
id="path4291"
d="m 205.51179,276.37793 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 294.09448,276.37793 0,24.80315"
id="path4301"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4311"
d="m 382.67717,276.37793 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
inkscape:connector-curvature="0"
id="path4345"
d="m 471.25984,276.37793 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 559.8425,276.37793 0,24.80315"
id="path4347"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4349"
d="m 648.42519,276.37793 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4361"
width="70.866119"
height="38.976383"
x="790.15753"
y="205.5118" />
<text
sodipodi:linespacing="125%"
id="text4363"
y="216.14172"
x="793.70087"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="216.14172"
x="793.70087"
id="tspan4365"
sodipodi:role="line"
style="font-weight:bold">ACK BIT</tspan><tspan
id="tspan4367"
y="228.64172"
x="793.70087"
sodipodi:role="line">- sample ACK </tspan><tspan
y="241.14172"
x="793.70087"
sodipodi:role="line"
id="tspan4369">from master</tspan></text>
<path
inkscape:connector-curvature="0"
id="path4371"
d="m 790.15748,244.48816 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="85.039368"
y="226.77165"
id="text4373"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4375"
x="85.039368"
y="226.77165">BIT 7</tspan><tspan
sodipodi:role="line"
x="85.039368"
y="239.27165"
id="tspan4379">- bit_cnt++</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4381"
width="70.866142"
height="28.346453"
x="81.496063"
y="216.14172" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 81.496063,244.48816 0,24.80315"
id="path4403"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4405"
d="m 170.07874,244.48816 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 258.66141,244.48816 0,24.80315"
id="path4407"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4411"
d="m 347.24409,244.48816 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 435.82675,244.48816 0,24.80315"
id="path4423"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4435"
d="m 524.40948,244.48816 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 612.99213,244.48816 0,24.80315"
id="path4447"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4459"
d="m 701.5748,244.48816 0,24.80315"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<text
sodipodi:linespacing="125%"
id="text4471"
y="226.77165"
x="173.62204"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="226.77165"
x="173.62204"
id="tspan4473"
sodipodi:role="line"
style="font-weight:bold">BIT 6</tspan><tspan
id="tspan4475"
y="239.27165"
x="173.62204"
sodipodi:role="line">- bit_cnt++</tspan></text>
<rect
y="216.14172"
x="170.07874"
height="28.346453"
width="70.866142"
id="rect4477"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="262.20471"
y="226.77165"
id="text4479"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4481"
x="262.20471"
y="226.77165">BIT 5</tspan><tspan
sodipodi:role="line"
x="262.20471"
y="239.27165"
id="tspan4483">- bit_cnt++</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4485"
width="70.866142"
height="28.346453"
x="258.66141"
y="216.14172" />
<text
sodipodi:linespacing="125%"
id="text4487"
y="226.77165"
x="350.78738"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="226.77165"
x="350.78738"
id="tspan4489"
sodipodi:role="line"
style="font-weight:bold">BIT 4</tspan><tspan
id="tspan4491"
y="239.27165"
x="350.78738"
sodipodi:role="line">- bit_cnt++</tspan></text>
<rect
y="216.14172"
x="347.24408"
height="28.346453"
width="70.866142"
id="rect4493"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="439.37009"
y="226.77165"
id="text4495"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4497"
x="439.37009"
y="226.77165">BIT 3</tspan><tspan
sodipodi:role="line"
x="439.37009"
y="239.27165"
id="tspan4499">- bit_cnt++</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4501"
width="70.866142"
height="28.346453"
x="435.82678"
y="216.14172" />
<text
sodipodi:linespacing="125%"
id="text4503"
y="226.77165"
x="527.95276"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="226.77165"
x="527.95276"
id="tspan4505"
sodipodi:role="line"
style="font-weight:bold">BIT 2</tspan><tspan
id="tspan4507"
y="239.27165"
x="527.95276"
sodipodi:role="line">- bit_cnt++</tspan></text>
<rect
y="216.14172"
x="524.40942"
height="28.346453"
width="70.866142"
id="rect4509"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="616.53546"
y="226.77165"
id="text4511"
sodipodi:linespacing="125%"><tspan
style="font-weight:bold"
sodipodi:role="line"
id="tspan4513"
x="616.53546"
y="226.77165">BIT 1</tspan><tspan
sodipodi:role="line"
x="616.53546"
y="239.27165"
id="tspan4515">- bit_cnt++</tspan></text>
<rect
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4517"
width="70.866142"
height="28.346453"
x="612.99213"
y="216.14172" />
<text
sodipodi:linespacing="125%"
id="text4519"
y="226.77165"
x="705.1181"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="226.77165"
x="705.1181"
id="tspan4521"
sodipodi:role="line"
style="font-weight:bold">BIT 0</tspan><tspan
id="tspan4523"
y="239.27165"
x="705.1181"
sodipodi:role="line">- bit_cnt++</tspan></text>
<rect
y="216.14172"
x="701.57477"
height="28.346453"
width="70.866142"
id="rect4525"
style="opacity:0.98999999;fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 729.92126,262.20465 1e-5,38.97641"
id="path3268"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="784.57941"
height="126.67509"
id="svg2"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="New document 1">
<defs
id="defs4">
<marker
inkscape:stockid="TriangleOutM"
orient="auto"
refY="0"
refX="0"
id="TriangleOutM"
style="overflow:visible">
<path
id="path3933"
d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="scale(0.4,0.4)"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="368.04522"
inkscape:cy="-56.867786"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1855"
inkscape:window-height="1148"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-229.09556,-108.46873)">
<g
id="g3773"
transform="translate(-4.4806012,0)">
<path
transform="matrix(0.52372011,0,0,0.52372011,209.1211,95.152762)"
d="m 312.13714,160.39749 c 0,21.19989 -32.7889,38.3858 -73.23606,38.3858 -40.44716,0 -73.23606,-17.18591 -73.23606,-38.3858 0,-21.19989 32.7889,-38.38579 73.23606,-38.38579 40.44716,0 73.23606,17.1859 73.23606,38.38579 z"
sodipodi:ry="38.385796"
sodipodi:rx="73.236061"
sodipodi:cy="160.39749"
sodipodi:cx="238.90108"
id="path2985"
style="fill:#000000;fill-opacity:0.03921569;fill-rule:evenodd;stroke:#000000;stroke-width:1.90941679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:type="arc" />
<text
sodipodi:linespacing="125%"
id="text3755"
y="183.53018"
x="318.98938"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:12px;font-weight:bold"
y="183.53018"
x="318.98938"
id="tspan3757"
sodipodi:role="line">IDLE</tspan></text>
</g>
<g
id="g4230"
transform="translate(-53.571429,74.041579)">
<text
sodipodi:linespacing="125%"
id="text3759"
y="96.603294"
x="282.67578"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="96.603294"
x="282.67578"
id="tspan3761"
sodipodi:role="line">STA</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="281.87598"
y="122.36218"
id="text3763"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3765"
x="281.87598"
y="122.36218">STO</tspan></text>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)"
d="m 256.81789,168.04249 30.16715,5.778"
id="path3782"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4236"
d="m 256.81789,192.25844 30.16715,-5.778"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)" />
<g
id="g4874">
<path
sodipodi:type="arc"
style="fill:#000000;fill-opacity:0.03921569;fill-rule:evenodd;stroke:#000000;stroke-width:1.90941679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path4240"
sodipodi:cx="238.90108"
sodipodi:cy="160.39749"
sodipodi:rx="73.236061"
sodipodi:ry="38.385796"
d="m 312.13714,160.39749 c 0,21.19989 -32.7889,38.3858 -73.23606,38.3858 -40.44716,0 -73.23606,-17.18591 -73.23606,-38.3858 0,-21.19989 32.7889,-38.38579 73.23606,-38.38579 40.44716,0 73.23606,17.1859 73.23606,38.38579 z"
transform="matrix(0.52372011,0,0,0.52372011,313.56907,95.152762)" />
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="419.55551"
y="183.53018"
id="text4242"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4244"
x="419.55551"
y="183.53018"
style="font-size:12px;font-weight:bold">ADDR</tspan></text>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)"
d="m 370.71429,179.15615 25.71428,0"
id="path4251"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4435"
d="m 481.2901,179.15615 25.71428,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)" />
<g
id="g4855">
<path
transform="matrix(0.8051458,0,0,0.8051458,380.97903,50.012787)"
d="m 312.13714,160.39749 c 0,21.19989 -32.7889,38.3858 -73.23606,38.3858 -40.44716,0 -73.23606,-17.18591 -73.23606,-38.3858 0,-21.19989 32.7889,-38.38579 73.23606,-38.38579 40.44716,0 73.23606,17.1859 73.23606,38.38579 z"
sodipodi:ry="38.385796"
sodipodi:rx="73.236061"
sodipodi:cy="160.39749"
sodipodi:cx="238.90108"
id="path4437"
style="fill:#000000;fill-opacity:0.03921569;fill-rule:evenodd;stroke:#000000;stroke-width:1.24201107;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:type="arc" />
<text
sodipodi:linespacing="125%"
id="text4439"
y="174.69424"
x="573.12122"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:12px;font-weight:bold;text-align:center;text-anchor:middle"
y="174.69424"
x="573.12122"
id="tspan4441"
sodipodi:role="line">ADDR_CHECK</tspan><tspan
id="tspan4443"
style="font-size:12px;font-weight:bold;text-align:center;text-anchor:middle"
y="189.69424"
x="573.12122"
sodipodi:role="line">ADDR_ACK</tspan></text>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)"
d="m 513.21429,199.1479 c -48.82145,30.04047 -98.05083,39.07277 -148.21429,0"
id="path4451"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)"
d="m 631.42857,163.79075 32.14286,-13.92857"
id="path4635"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4819"
d="m 631.42857,194.53297 32.14286,13.92857"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)" />
<g
id="g4861"
transform="translate(15.892857,0)">
<path
transform="matrix(0.82801985,0,0,0.52372011,517.14825,63.332957)"
d="m 312.13714,160.39749 c 0,21.19989 -32.7889,38.3858 -73.23606,38.3858 -40.44716,0 -73.23606,-17.18591 -73.23606,-38.3858 0,-21.19989 32.7889,-38.38579 73.23606,-38.38579 40.44716,0 73.23606,17.1859 73.23606,38.38579 z"
sodipodi:ry="38.385796"
sodipodi:rx="73.236061"
sodipodi:cy="160.39749"
sodipodi:cx="238.90108"
id="path4821"
style="fill:#000000;fill-opacity:0.03921569;fill-rule:evenodd;stroke:#000000;stroke-width:1.51855314;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:type="arc" />
<text
sodipodi:linespacing="125%"
id="text4823"
y="150.37444"
x="661.83905"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:12px;font-weight:bold"
y="150.37444"
x="661.83905"
id="tspan4825"
sodipodi:role="line">WR_LOAD_TXSR</tspan></text>
</g>
<g
id="g4833">
<text
sodipodi:linespacing="125%"
id="text4827"
y="137.66905"
x="615.33521"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="137.66905"
x="615.33521"
id="tspan4829"
sodipodi:role="line">R/W = '0'</tspan></text>
<path
inkscape:connector-curvature="0"
id="path4831"
d="m 629.28572,126.73718 8.39285,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
id="g4838"
transform="translate(0,92.428958)">
<g
id="g4846">
<text
sodipodi:linespacing="125%"
id="text4840"
y="137.66905"
x="615.33521"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="137.66905"
x="615.33521"
id="tspan4842"
sodipodi:role="line">R/W = '1'</tspan></text>
<path
inkscape:connector-curvature="0"
id="path4844"
d="m 629.28572,126.73718 8.39285,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g>
<g
transform="translate(163.03571,0)"
id="g4866" />
<g
id="g4879"
transform="translate(433.21429,-31.81981)">
<g
id="g4887">
<path
sodipodi:type="arc"
style="fill:#000000;fill-opacity:0.03921569;fill-rule:evenodd;stroke:#000000;stroke-width:1.90941679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path4881"
sodipodi:cx="238.90108"
sodipodi:cy="160.39749"
sodipodi:rx="73.236061"
sodipodi:ry="38.385796"
d="m 312.13714,160.39749 c 0,21.19989 -32.7889,38.3858 -73.23606,38.3858 -40.44716,0 -73.23606,-17.18591 -73.23606,-38.3858 0,-21.19989 32.7889,-38.38579 73.23606,-38.38579 40.44716,0 73.23606,17.1859 73.23606,38.38579 z"
transform="matrix(0.52372011,0,0,0.52372011,305.73802,95.152767)" />
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="419.55551"
y="183.53018"
id="text4883"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4885"
x="419.55551"
y="183.53018"
style="font-size:12px;font-weight:bold">WR</tspan></text>
</g>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)"
d="m 794.31112,147.33635 25.71428,0"
id="path4892"
inkscape:connector-curvature="0" />
<g
id="g4916"
transform="translate(-1.3926768,0)">
<g
id="g4904"
transform="translate(545.35714,-31.81981)">
<g
id="g4906">
<path
sodipodi:type="arc"
style="fill:#000000;fill-opacity:0.03921569;fill-rule:evenodd;stroke:#000000;stroke-width:1.90941679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path4908"
sodipodi:cx="238.90108"
sodipodi:cy="160.39749"
sodipodi:rx="73.236061"
sodipodi:ry="38.385796"
d="m 312.13714,160.39749 c 0,21.19989 -32.7889,38.3858 -73.23606,38.3858 -40.44716,0 -73.23606,-17.18591 -73.23606,-38.3858 0,-21.19989 32.7889,-38.38579 73.23606,-38.38579 40.44716,0 73.23606,17.1859 73.23606,38.38579 z"
transform="matrix(0.52372011,0,0,0.52372011,305.73802,95.152767)" />
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="402.56039"
y="182.19424"
id="text4910"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4912"
x="402.56039"
y="182.19424"
style="font-size:12px;font-weight:bold">WR_ACK</tspan></text>
</g>
</g>
</g>
<path
inkscape:connector-curvature="0"
id="path4914"
d="m 904.83415,147.33635 25.71428,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)" />
<g
transform="translate(279.04347,31.037333)"
id="g4931">
<g
id="g4933">
<path
transform="matrix(0.52372011,0,0,0.52372011,305.73802,95.152767)"
d="m 312.13714,160.39749 c 0,21.19989 -32.7889,38.3858 -73.23606,38.3858 -40.44716,0 -73.23606,-17.18591 -73.23606,-38.3858 0,-21.19989 32.7889,-38.38579 73.23606,-38.38579 40.44716,0 73.23606,17.1859 73.23606,38.38579 z"
sodipodi:ry="38.385796"
sodipodi:rx="73.236061"
sodipodi:cy="160.39749"
sodipodi:cx="238.90108"
id="path4935"
style="fill:#000000;fill-opacity:0.03921569;fill-rule:evenodd;stroke:#000000;stroke-width:1.90941679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:type="arc" />
<text
sodipodi:linespacing="125%"
id="text4937"
y="183.53018"
x="421.02036"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:12px;font-weight:bold"
y="183.53018"
x="421.02036"
id="tspan4939"
sodipodi:role="line">RD</tspan></text>
</g>
</g>
<g
transform="translate(-153.06349,62.857143)"
id="g4943">
<g
transform="translate(545.35714,-31.81981)"
id="g4945">
<g
id="g4947">
<path
transform="matrix(0.52372011,0,0,0.52372011,305.73802,95.152767)"
d="m 312.13714,160.39749 c 0,21.19989 -32.7889,38.3858 -73.23606,38.3858 -40.44716,0 -73.23606,-17.18591 -73.23606,-38.3858 0,-21.19989 32.7889,-38.38579 73.23606,-38.38579 40.44716,0 73.23606,17.1859 73.23606,38.38579 z"
sodipodi:ry="38.385796"
sodipodi:rx="73.236061"
sodipodi:cy="160.39749"
sodipodi:cx="238.90108"
id="path4949"
style="fill:#000000;fill-opacity:0.03921569;fill-rule:evenodd;stroke:#000000;stroke-width:1.90941679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:type="arc" />
<text
sodipodi:linespacing="125%"
id="text4951"
y="182.19424"
x="403.82895"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:12px;font-weight:bold"
y="182.19424"
x="403.82895"
id="tspan4953"
sodipodi:role="line">RD_ACK</tspan></text>
</g>
</g>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)"
d="m 752.80619,210.19349 25.71428,0"
id="path4955"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)"
d="m 864.02757,210.19349 66.42857,0"
id="path4957"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<g
id="g4959"
transform="translate(0.98477325,62.857143)">
<g
id="g4961"
transform="translate(545.35714,-31.81981)">
<g
id="g4963" />
</g>
</g>
<path
transform="matrix(0.52372011,0,0,0.52372011,849.70248,126.1901)"
d="m 312.13714,160.39749 c 0,21.19989 -32.7889,38.3858 -73.23606,38.3858 -40.44716,0 -73.23606,-17.18591 -73.23606,-38.3858 0,-21.19989 32.7889,-38.38579 73.23606,-38.38579 40.44716,0 73.23606,17.1859 73.23606,38.38579 z"
sodipodi:ry="38.385796"
sodipodi:rx="73.236061"
sodipodi:cy="160.39749"
sodipodi:cx="238.90108"
id="path4973"
style="fill:#000000;fill-opacity:0.03921569;fill-rule:evenodd;stroke:#000000;stroke-width:1.90941679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:11.45650107, 11.45650107;stroke-dashoffset:0;marker-start:none"
sodipodi:type="arc" />
<text
sodipodi:linespacing="125%"
id="text4975"
y="214.56752"
x="959.57074"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:12px;font-weight:bold"
y="214.56752"
x="959.57074"
id="tspan4977"
sodipodi:role="line">IDLE</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)"
d="m 974.43458,169.87878 0,15.17857"
id="path5528"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)"
d="m 793.22229,227.57263 c -11.64123,9.61383 -31.0382,9.24083 -48.73986,0"
id="path5530"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)"
d="m 943.21429,132.36218 c -51.2019,-30.44216 -102.84583,-31.93148 -155,0"
id="path5716"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</svg>
......@@ -10,7 +10,7 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="513.25293"
height="172.24207"
height="147.99841"
id="svg5725"
version="1.1"
inkscape:version="0.48.3.1 r9886"
......@@ -26,7 +26,7 @@
inkscape:pageshadow="2"
inkscape:zoom="1.979899"
inkscape:cx="360.61373"
inkscape:cy="71.153224"
inkscape:cy="46.909564"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
......@@ -59,7 +59,7 @@
transform="translate(12.270655,-83.87603)">
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 212.48847,237.90156 35.43307,0 0,0 17.71653,-35.43307 17.71654,0 17.71653,35.43307 35.43307,0"
d="m 212.48847,218.70866 35.43307,0 0,0 17.71653,-35.43307 17.71654,0 17.71653,35.43307 35.43307,0"
id="path5749"
inkscape:connector-curvature="0" />
<text
......@@ -77,24 +77,24 @@
<text
sodipodi:linespacing="125%"
id="text5759"
y="224.05318"
y="204.86028"
x="-13.131983"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:12px;font-weight:bold"
y="224.05318"
y="204.86028"
x="-13.131983"
id="tspan5761"
sodipodi:role="line">SCL</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 53.149606,201.96848 70.866144,0 17.71653,35.43307 17.71654,0"
d="m 53.149606,182.77558 70.866144,0 17.71653,35.43307 17.71654,0"
id="path6292"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path6294"
d="m 496.063,201.96848 -70.86615,0 -17.71653,35.43307 -17.71654,0"
d="m 496.063,182.77558 -70.86615,0 -17.71653,35.43307 -17.71654,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
......@@ -110,13 +110,13 @@
style="opacity:0.75;fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 8;stroke-dashoffset:0"
id="rect6300"
width="35.714287"
height="141.73228"
height="112.94294"
x="80"
y="113.3858" />
<rect
y="113.3858"
x="435.06863"
height="141.73228"
height="113.44801"
width="35.714287"
id="rect6302"
style="opacity:0.75;fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 8;stroke-dashoffset:0" />
......@@ -161,14 +161,16 @@
y="97.342827">Stop condition (P)</tspan></text>
<path
style="opacity:0.75;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:6, 6;stroke-dashoffset:0"
d="m 247.92154,113.88581 0,141.73229"
d="m 247.92154,113.88581 0,117.48863"
id="path6320"
inkscape:connector-curvature="0" />
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="opacity:0.75;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:6, 6;stroke-dashoffset:0"
d="m 301.07114,113.88581 0,141.73229"
d="m 301.07114,113.88581 0,117.48863"
id="path6322"
inkscape:connector-curvature="0" />
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<g
id="g4484"
transform="matrix(1,0,0,-0.98588871,-0.10995786,295.78773)">
......
......@@ -88,7 +88,7 @@
\section{Introduction}
\label{sec:intro}
The \textit{i2c\_slave} VHDL module implements a simple I$^2$C
The \textit{gc\_i2c\_slave} VHDL module implements a simple I$^2$C
slave core capable of responding to I$^2$C transfers generated by a master. The module
is conceived to be controlled by an external module. Basic shifting of bits into the
module is handled during read transfers (from the slave's point of view), at the end of
......@@ -96,7 +96,7 @@ which the user is presented with the received byte. Similarly, in the case of a
transfer, the user inputs a byte to be sent, and the module handles shifting out of each
of the bits. The status of the module can be obtained via dedicated ports.
The main features of the \textit{i2c\_slave} module are:
The main features of the \textit{gc\_i2c\_slave} module are:
\begin{itemize}
\item simple operation
\begin{itemize}
......@@ -119,8 +119,8 @@ The main features of the \textit{i2c\_slave} module are:
\section{Instantiation}
\label{sec:instantiation}
This section offers information useful for instantiating the \textit{i2c\_slave} core module.
Table~\ref{tbl:ports} presents a list of ports of the \textit{i2c\_slave} module.
This section offers information useful for instantiating the \textit{gc\_i2c\_slave} core module.
Table~\ref{tbl:ports} presents a list of ports of the \textit{gc\_i2c\_slave} module.
I$^2$C-specific ports should be instantiated as outlined in Figure~\ref{fig:i2c-ports}, via
tri-state buffers enabled by the \textit{scl\_en\_o} lines \textit{sda\_en\_o}.
......@@ -157,42 +157,50 @@ To instantiate a tri-state buffer in VHDL:
\normalsize
The rest of the ports should be connected in a normal manner to an external controlling module. A
component declaration of the \textit{i2c\_slave} module is readily available in the
\textit{i2c\_slave\_pkg.vhd} package file. The package also defines constants for the
statuses readable at the \textit{stat\_o} pin. Refer to Section~\ref{sec:oper} for details
regarding the various statuses.
\begin{table}[h]
\caption{Ports of \textit{i2c\_slave} module}
\caption{Ports and generics of \textit{gc\_i2c\_slave} module}
\label{tbl:ports}
\centerline
{
\begin{tabular}{l c p{.65\textwidth}}
\begin{tabular}{l p{.8\textwidth}}
\hline
\multicolumn{1}{c}{\textbf{Name}} & \textbf{Size} & \multicolumn{1}{c}{\textbf{Description}} \\
\multicolumn{1}{c}{\textbf{Name}} & \multicolumn{1}{c}{\textbf{Description}} \\
\hline
clk\_i & 1 & Clock input \\
rst\_n\_i & 1 & Active-low reset input \\
scl\_i & 1 & SCL line input \\
scl\_o & 1 & SCL line output \\
scl\_en\_o & 1 & SCL line tri-state enable \\
sda\_i & 1 & SDA line input \\
sda\_o & 1 & SDA line output \\
sda\_en\_o & 1 & SDA line output tri-state enable \\
i2c\_addr\_i & 7 & I$^2$C slave address of the module, compaired against received address \\
ack\_n\_i & 1 & ACK to be sent to the master in case of master write transfers \\
op\_o & 1 & State of the R/W bit at the end of the address byte \\
tx\_byte\_i & 8 & Byte of data to be sent over I$^2$C \\
rx\_byte\_o & 8 & Byte received over I$^2$C \\
done\_p\_o & 1 & One \textit{clk\_i} cycle-wide pulse, signaling the slave module
has performed a valid transfer \\
stat\_o & 3 & Current state of communication \\
g\_gf\_len & Glitch filter length generic \newline
1 -- glitches narrower than 1 \textit{clk\_i} cycle are filtered \newline
2 -- glitches narrower than 2 \textit{clk\_i} cycles are filtered \newline
etc.\\
clk\_i & Clock input \\
rst\_n\_i & Active-low reset input \\
scl\_i & SCL line input \\
scl\_o & SCL line output \\
scl\_en\_o & SCL line tri-state enable \\
sda\_i & SDA line input \\
sda\_o & SDA line output \\
sda\_en\_o & SDA line output tri-state enable \\
i2c\_addr\_i & I$^2$C slave address of the module, compaired against received address \\
ack\_i & ACK to be sent to the master in case of master write transfers \newline
'1' -- send an ACK to the master (ACK bit = '0') \newline
'0' -- send an NACK to the master (NACK bit = '1') \\
tx\_byte\_i & Byte of data to be sent over I$^2$C \\
rx\_byte\_o & Byte received over I$^2$C \\
sta\_p\_o & Start condition on I$^2$C bus (one-cycle-wide pulse) \\
sto\_p\_o & Stop condition on I$^2$C bus (one-cycle-wide pulse) \\
addr\_good\_p\_o & Slave address received from master corresponds that on
i2c\_addr\_i (one-cycle-wide pulse) \\
r\_done\_p\_o & Slave read done (one-cycle-wide pulse) \\
w\_done\_p\_o & Slave write done (one-cycle-wide pulse) \\
op\_o & State of the R/W bit at the end of the address byte \\
\hline
\end{tabular}
}
\end{table}
\pagebreak
The rest of the ports should be connected in a normal manner to an external controlling module. A
component declaration of the \textit{gc\_i2c\_slave} module is readily available in the
\textit{gencores\_pkg.vhd} file.
%==============================================================================
% SEC: I2C bus
%==============================================================================
......@@ -227,7 +235,7 @@ A typical I$^2$C bit-level transfer (Figure~\ref{fig:i2c-bitlevel}) follows the
\end{itemize}
\begin{figure}[h]
\centerline{\includegraphics[width=\textwidth]{fig/i2c-bitlevel}}
\centerline{\includegraphics[width=.9\textwidth]{fig/i2c-bitlevel}}
\caption{Bit-level transfers on the I$^2$C bus}
\label{fig:i2c-bitlevel}
\end{figure}
......@@ -251,7 +259,7 @@ data transfer (Figure~\ref{fig:i2c-transf}):
\item the master ends data transfer by sending the stop condition
\end{itemize}
\begin{figure}
\begin{figure}[h]
\centerline{\includegraphics[width=\textwidth]{fig/i2c-transf}}
\caption{Bytes transferred on the I$^2$C bus}
\label{fig:i2c-transf}
......@@ -264,101 +272,80 @@ data transfer (Figure~\ref{fig:i2c-transf}):
\section{Operation}
\label{sec:oper}
The \textit{i2c\_slave} waits for a start condition to be performed on the I$^2$C bus by a
The \textit{gc\_i2c\_slave} waits for a start condition to be performed on the I$^2$C bus by a
master module. The address is shifted in and if it matches the slave address set via
the \textit{i2c\_addr\_i} input, the \textit{done\_p\_o} output is set for one \textit{clk\_i}
cycle and the \textit{stat\_o} output signals an address match. Based on the eighth
bit of the first I2C transfer byte, the module then starts shifting in or out each byte
in the transfer, setting the \textit{done\_p\_o} output for one clock cycle after each
received/sent byte. The \textit{stat\_o} output can be checked to see if the byte has been
sent/received correctly.
When the cycle-wide \textit{done\_p\_o} output is high (after every successful transfer, or a
stop condition) the \textit{stat\_o} (possibly together with the \textit{op\_o}) output can be checked
to see the appropriate action to be taken. The various statuses possible at the
\textit{stat\_o} output are listed in Table~\ref{tbl:stat}.
the \textit{i2c\_addr\_i} input, the \textit{addr\_good\_p\_o} output is set for one
\textit{clk\_i} cycle Based on the eighth bit of the first I$^2$C transfer byte, the module
then starts shifting in or out each byte in the transfer, setting the the \textit{r\_done\_p\_o}
pin high for one \textit{clk\_i} cycle after each successfully read byte, and respectively
the \textit{w\_done\_p\_o} output after each successfully written byte.
\begin{table}[h]
\caption{Statuses at the \textit{stat\_o} pin}
\label{tbl:stat}
\centerline
{
\begin{tabular}{c p{.65\textwidth}}
\hline
\multicolumn{1}{c}{\textbf{\textit{stat\_o}}} & \multicolumn{1}{c}{\textbf{Description}} \\
\hline
00 & Slave idle, waiting for start condition. This is the state upon startup and after the I$^2$C stop
condition is received \\
01 & Address sent by the master matches that at \textit{i2c\_addr\_i}; \textit{op\_o}
valid \\
10 & Read done, waiting for ACK/NACK to send to master \\
11 & Write done, waiting for next byte to send to master \\
\hline
\end{tabular}
}
\end{table}
The \textit{ack\_i} port is used for sending the ACK to the master. The polarity of the bit
is opposite to that of the I$^2$C ACK signal. On the I$^2$C bus, a '0' signals an ACK while a '1'
an NACK. To send an ACK, the user sohuld input a '1' on the \textit{ack\_i} port.
Note that a '1' should be set at the input also when the address is ACKed, otherwise the slave
will not acknowledge its own address. NACKing the slave address can be used when the user
wants to isolate the slave from the bus.
The \textit{ack\_n\_i} port is used for sending the ACK to the master. The polarity of the bit
is that of the I$^2$C ACK signal ('0' -- ACK, '1' -- NACK). A '0' should be set
at the input also when the address is ACKed, otherwise the slave will not acknowledge its own
address. This implies that the \textit{ack\_n\_i} pin can be used to isolate the slave from the
bus.
Additionally, the slave module includes two one-cycle-wide pulse ports (\textit{sta\_p\_o} and
\textit{sto\_p\_o}), which signal when a start and stop condition occurs on the bus.
%------------------------------------------------------------------------------
\subsection{Read mode}
When the eighth bit of the address byte is low (R/W = '0'), the slave goes into read
mode. Each bit of the byte sent by the master is shifted in on the falling edge of SCL. After
eight bits have been shifted in, \textit{done\_p\_o} is set for one \textit{clk\_i} cycle and
the status signals a successful read ("10"). The received byte should be read from the
\textit{rx\_byte\_o} output and an ACK ('0') or NACK~('1') should be sent to the master via the
\textit{ack\_n\_i} pin. The \textit{i2c\_slave} module does not implement clock stretching,
so the \textit{ack\_n\_i} pin should be set before the SCL line goes high.
mode. Each bit of the byte sent by the master is shifted in on the rising edge of SCL. After
eight bits have been shifted in, \textit{r\_done\_p\_o} is set for one \textit{clk\_i}.
The received byte should be read from the \textit{rx\_byte\_o} output and an ACK~('1') or
NACK~('0') should be sent to the master via the \textit{ack\_i} pin. The \textit{gc\_i2c\_slave}
module does not implement clock stretching, so the \textit{ack\_i} pin should be set before
the SCL line goes high.
The steps below should be followed when reading one or more bytes sent by the master:
\begin{enumerate}
\item Wait for \textit{done\_p\_o} to go high, signaling the I$^2$C address of the slave
\item Wait for \textit{addr\_good\_p\_o} to go high, signaling the I$^2$C address of the slave
has been read.
\item Check that \textit{stat\_o} is "01" (address good) and that \textit{op\_o} is '0'
(master write, slave read). Set a '0' at the \textit{ack\_n\_i} input to send the
ACK to the address; if \textit{ack\_n\_i} is '1', the slave does not acknowledge its
own address.
\item Wait for \textit{done\_p\_o} to go high.
\item Check that \textit{stat\_o} is "10" (read done), read the received byte from
\textit{rx\_byte\_o} and write a '0' at \textit{ack\_n\_i} to send an ACK, or a
'1' to send an NACK.
\item Check that that \textit{op\_o} is '0' (master write, slave read). Set a '1' at the
\textit{ack\_i} input to send the ACK to the address; if \textit{ack\_i} is set '0', the slave
does not acknowledge its own address.
\item Wait for \textit{r\_done\_p\_o} to go high.
\item Read the received byte from \textit{rx\_byte\_o} and write a '1' at \textit{ack\_i}
to send an ACK, or a '0' to send an NACK.
\item The transfer is repeated until the master sends a stop condition.
\item After the stop condition is received, the \textit{done\_p\_o} goes high for one
clock cycle and the status is set to "00".
\item After the stop condition is received, \textit{sto\_p\_o} goes high for one \textit{clk\_i}
cycle and the slave goes idle.
\end{enumerate}
Note that on start conditions, \textit{sta\_p\_o} is set high for one \textit{clk\_i} cycle.
%------------------------------------------------------------------------------
\subsection{Write mode}
When a master reads from the slave, the eighth bit of the address byte is high
(R/W = '1'). In this case, the \textit{i2c\_slave} module goes in write mode, where
When the slave is to write to the master, the eighth bit of the address byte is high
(R/W = '1'). In this case, the \textit{gc\_i2c\_slave} module goes in write mode, where
the byte at the \textit{tx\_byte\_i} port is sent to the master. When the byte has been
successfully sent, the \textit{done\_p\_o} is high for one clock cycle and the \textit{stat\_o}
port has the value "11", signaling the slave has successfully sent a byte and is
awaiting the loading of another byte.
successfully sent, the \textit{w\_done\_p\_o} is high for one clock cycle, signaling the
slave has successfully sent a byte and is awaiting the loading of another byte.
The steps below should be followed when writing one or more bytes to a master:
\begin{enumerate}
\item Wait for \textit{done\_p\_o} to go high, signaling the I$^2$C address of the slave
\item Wait for \textit{addr\_good\_p\_o} to go high, signaling the I$^2$C address of the slave
has been read.
\item Check that \textit{stat\_o} is "01" (address good) and \textit{op\_o} is '1'
(master read, slave write). Set the byte to be sent to the master at the
\textit{tx\_byte\_i} input. Set a '0' at \textit{ack\_n\_i} to send the ACK to the address;
if \textit{ack\_n\_i} is '1', the slave does not acknowledge its own address.
\item Wait for \textit{done\_p\_o} to go high.
\item Check that \textit{stat\_o} is "11" (write done) and set the next byte to be
sent at the \textit{tx\_byte\_i} port.
\item Check that \textit{op\_o} is '1' (master read, slave write). Set the byte to be sent
to the master at the \textit{tx\_byte\_i} input. Set a '1' at \textit{ack\_i} to send the
ACK to the address; if \textit{ack\_i} is set '0', the slave does not acknowledge its own
address.
\item Wait for \textit{w\_done\_p\_o} to go high.
\item Set the next byte to be sent at the \textit{tx\_byte\_i} port.
\item If the master acknowledges the transfer, the next byte is sent, otherwise, the master
will send a stop condition, so the \textit{i2c\_slave} module is reset.
will send a stop condition, and the \textit{gc\_i2c\_slave} module is returned to IDLE. The
\textit{sto\_p\_o} output is also set high for one \textit{clk\_i} cycle.
\end{enumerate}
Note that if a stop condition is received from the master, the \textit{done\_p\_o} goes high for
one clock cycle and the status is set to "00".
Note that on start conditions, \textit{sta\_p\_o} is set high for one \textit{clk\_i} cycle.
%==============================================================================
% SEC: Implementation
......@@ -366,31 +353,44 @@ one clock cycle and the status is set to "00".
\section{Implementation}
\label{sec:implem}
This section presents implementation details of the \textit{i2c\_slave} module. A simplified
block diagram of the module is presented in Figure~\ref{fig:i2c-slave-bd}.
A simplified block diagram of the \textit{gc\_i2c\_slave} module is presented in
Figure~\ref{fig:i2c-slave-bd}. Deglitched versions of the SCL and SDA lines control
operation of the central finite-state machine (FSM), which sets the outputs and
controls the rest of the components in the module. The glitch filter lengths can
be set in units of \textit{clk\_i} cycles via the \textit{g\_gf\_len} module generic.
The FSM controls how outputs are set, when the reception and transmission shift registers
(RXSR/TXSR) are loaded and when they shift, and acknowledging to the address and bytes
sent by the master.
\begin{figure}[h]
\centerline{\includegraphics[width=\textwidth]{fig/i2c-slave-bd}}
\caption{Block diagram of \textit{i2c\_slave} module}
\caption{Block diagram of \textit{gc\_i2c\_slave} module}
\label{fig:i2c-slave-bd}
\end{figure}
Deglitched versions of the SCL and SDA lines control operation of the central finite-state
machine (FSM), which sets the outputs and controls the rest of the components in the module.
Figure~\ref{fig:fsm-diag} shows a simplified state transition diagram of the FSM,
and Table~\ref{tbl:fsm} lists the states of the FSM and the operations performed in each
state. Across the FSM, shifting of bits into the module is done on the rising edge
of SCL and shifting out is done on the falling edge of SCL. A three-bit counter is
used to count the number of received bits. This bit counter is incremented on the
rising edge of SCL. During read and write cycles, the FSM also changes states on
the SCL falling edge. A summary of the FSM actions with reference to the SCL line
on read and write transfer is shown in Figure~\ref{fig:fsm-and-scl}.
The FSM is sensitive to start and stop conditions and falling edges of the SCL line. It
controls how outputs are set, when the reception and transmission shift registers (RXSR/TXSR)
are loaded and when they shift, and acknowledging to the address and bytes sent by the
master. Table~\ref{tbl:fsm} lists the states of the FSM and the operations performed
in each state.
\begin{figure}[h]
\centerline{\includegraphics[width=\textwidth]{fig/fsm-diag}}
\caption{Simplified FSM state transition diagram}
\label{fig:fsm-diag}
\end{figure}
An internal watchdog counter is implemented inside the \textit{i2c\_slave} module. This counter
counts up to 1 second and is reset at the start of each state of the FSM. If the FSM stops
in one of the states because of a bus error, the watchdog resets the FSM, thereby stopping the
communication.
\begin{figure}[h]
\centerline{\includegraphics[width=\textwidth]{fig/fsm-and-scl}}
\caption{FSM actions on SCL edges}
\label{fig:fsm-and-scl}
\end{figure}
\begin{longtable}{l p{.7\textwidth}}
\caption{The states of the \textit{i2c\_slave} FSM}
\caption{The states of the \textit{gc\_i2c\_slave} FSM}
\label{tbl:fsm} \\
\hline
......@@ -406,73 +406,103 @@ communication.
\hline
\endfoot
\textit{IDLE} & Idle state, FSM default state after reset and the state returned to after
reception of a stop condition. \\
\textit{STA} & State reached after a start condition is received. On the falling edge
of SCL, the FSM transitions to \textit{ADDR} state. \\
\textit{ADDR} & Shift in 7 address bits and R/W bit and go to \textit{ADDR\_ACK}
state. Each bit is shifted in on the falling edge of SCL. If the
received address matches, \textit{op\_o} and \textit{done\_p\_o} are set. \\
\textit{ADDR\_ACK} & Check received address and send the ACK value at \textit{ack\_n\_i} if
the address corresponds to \textit{i2c\_addr\_i}. If the R/W bit is high,
go to \textit{RD} state, otherwise go to \textit{WR\_LOAD\_TXSR} state.
If received address does not match, NACK and go to \textit{IDLE}
state. \\
\textit{IDLE} & Default state after reset and the state returned to after
reception of a start and stop condition. \\
\textit{ADDR} & Shift in the address and R/W bit. \\
\textit{ADDR\_CHECK} & Check the address versus \textit{i2c\_addr\_i} and set the \textit{op\_o}
output as per the R/W bit. \\
\textit{ADDR\_ACK} & Send ACK depending on value of \textit{ack\_i} and go to \textit{RD} state
if the R/W bit is high, or to \textit{WR\_LOAD\_TXSR} state if R/W bit is low.
If \textit{ack\_i} is low, go back to \textit{IDLE}. \\
\textit{RD} & Shift in eight bits sent by master and go to \textit{RD\_ACK} state. Each bit
is shifted in on the falling edge of SCL. When eight bits have been shifted in,
set \textit{done\_p\_o}. \\
\textit{RD\_ACK} & Read \textit{ack\_n\_i} and forward it to \textit{sda\_o} (ACK/NACK
from external controller). If \textit{ack\_n\_i} is '0', then go back to
\textit{RD} state, else to \textit{IDLE} state. \\
\textit{WR\_LOAD\_TXSR} & Load TX shift register with data at \textit{tx\_byte\_i} input
is shifted in on the rising edge of SCL. \\
\textit{RD\_ACK} & Send ACK depending on value of \textit{ack\_i}. If \textit{ack\_i} is '1',
then go back to \textit{RD} state, else to \textit{IDLE} state. \\
\textit{WR\_LOAD\_TXSR} & Load TX shift register with data at \textit{tx\_byte\_i} input
and go to \textit{WR} state. \\
\textit{WR} & Shift out the eight bits of the TXSR starting with MSB and go to
\textit{WR\_ACK} state. TXSR shifts left on falling edge of SCL. When
eight bits have been shifted out, \textit{done\_p\_o} is set.\\
\textit{WR\_ACK} state. TXSR shifts left on each falling edge of SCL. \\
\textit{WR\_ACK} & Read ACK bit sent by master. If '0', go back to \textit{WR} state, otherwise
go to \textit{IDLE} state. \\
\end{longtable}
%------------------------------------------------------------------------------
\subsection{Output control}
To keep to the I$^2$C standard, the I$^2$C outputs (\textit{sda\_o}, \textit{scl\_o}) are
not directly driven high. Instead, they are driven low and their respective enable outputs
are driven high and low, to enable the output buffers. In fact, since no clock stretching
is implemented, the SCL line is always disabled.
Therefore, when the term "send" is used below, it means controlling the \textit{sda\_en\_o}
line high and low to enable the output buffer and send a '0', or leave the line high.
%------------------------------------------------------------------------------
\subsection{Address byte}
The transfer starts by the master sending a start condition on the I$^2$C bus.
The slave detects this start condition and starts shifting in the address bits while in the
\textit{ADDR} state. After the eighth bit has been shifted in, the FSM goes into the
\textit{ADDR\_CHECK} state, where it checks the received address versus the
\textit{i2c\_addr\_i} pin and if it matches, the FSM goes into the \textit{ADDR\_ACK} state,
where the slave waits for the \textit{ack\_i} input to be set by the external controller.
If the external controller sets the \textit{ack\_i} pin high while the slave is
in the \textit{ADDR\_ACK} state, the slave module acknowledges its address received
from the master, and the transfer continues as indicated by the eighth bit in the
address byte.
While in the \textit{ADDR\_CHECK} state, the \textit{op\_o} and \textit{addr\_good\_p\_o}
outputs are also set high (\textit{addr\_good\_p\_o} is set for one clock cycle and
\textit{op\_o} is set until the next I$^2$C transfer).
Important to note is that if the address received from the master does not correspond
to \textit{i2c\_addr\_i} when it is checked in the \textit{ADDR\_CHECK} state, the
slave module NACKs the transfer and goes back to the \textit{IDLE} state, setting an inhibit
signal. The purpose of this inhibit signal is to prevent the slave from reacting to
other bytes sent by a master to another slave on the I$^2$C bus. If this inhibit
signal were not present and if a byte sent by the master to another slave on the bus
matches the slave module's address at the \textit{i2c\_addr\_i} port, the slave module
would acknowledge this byte as its own address. The inhibit signal is cleared only when
receiving a start or a stop condition, as after one of these two, the master would
send the I$^2$C slave address again, and this is when the slave module should become
active again.
%------------------------------------------------------------------------------
\subsection{Reading from a master}
The slave will read from a master when this eighth bit is high ('1'). On read
transfers, the FSM is in the \textit{RD} state, where bits on the SDA line are shifted
in by the slave on the rising edge of SCL (see Figure~\ref{fig:fsm-and-scl}). This
happens until the eighth bit has been shifted in, at which point the \textit{r\_done\_p\_o}
pin is set for one clock cycle and the FSM goes into the \textit{RD\_ACK} state. Here,
the external module controls the \textit{ack\_i} pin to ACK/NACK the received byte,
as in the case of the \textit{ADDR\_ACK} state. If the external module ACKs the
transfer, the slave module goes back to the \textit{RD} state to read another byte
from the master, or to the \textit{IDLE} state otherwise.
%------------------------------------------------------------------------------
\subsection{Writing to a master}
The slave will write to a master when the eighth bit in the address byte is low ('0').
On write transfers, the FSM is in the \textit{WR} state, where bits on the SDA line
are shifted out of the slave on the falling edge of SCL (see Figure~\ref{fig:fsm-and-scl}).
This happens until the eight bit has been transferred, at which point the slave sents
the \textit{w\_done\_p\_o} pin for one clock cycle and it goes into the \textit{WR\_ACK}
state, where it waits for the master to acknowledge the sent byte. The ACK from the master
is sampled in on the rising edge of SCL and it is checked on the falling edge of SCL,
to determine whether a new write transfer should occur or not. If the master has
ACKed the transfer, the FSM goes back to the \textit{WR} state to send another byte to
the master, or to the \textit{IDLE} state otherwise.
%------------------------------------------------------------------------------
\subsection{Start and stop conditions on the bus}
A start or a stop condition will take the slave module back into the \textit{IDLE}
state, irrespective of other control signals internal to the module.
%\pagebreak
%\begin{table}[h]
% \caption{The states of the \textit{i2c\_slave} FSM}
% \label{tbl:fsm}
% \centerline
% {
% \begin{tabular}{l p{.7\textwidth}}
% \hline
% \multicolumn{1}{c}{\textbf{State}} & \multicolumn{1}{c}{\textbf{Description}} \\
% \hline
% \textit{IDLE} & Idle state, FSM default state after reset and the state returned to after
% reception of a stop condition. \\
% \textit{STA} & State reached after a start condition is received. On the falling edge
% of SCL, the FSM transitions to \textit{ADDR} state. \\
% \textit{ADDR} & Shift in 7 address bits and R/W bit and go to \textit{ADDR\_ACK}
% state. Each bit is shifted in on the falling edge of SCL. If the
% received address matches, \textit{op\_o} and \textit{done\_p\_o} are set. \\
% \textit{ADDR\_ACK} & Check received address and send the ACK value at \textit{ack\_n\_i} if
% the address corresponds to \textit{i2c\_addr\_i}. If the R/W bit is high,
% go to \textit{RD} state, otherwise go to \textit{WR\_LOAD\_TXSR} state.
% If received address does not match, NACK and go to \textit{IDLE}
% state. \\
% \textit{RD} & Shift in eight bits sent by master and go to \textit{RD\_ACK} state. Each bit
% is shifted in on the falling edge of SCL. When eight bits have been shifted in,
% set \textit{done\_p\_o}. \\
% \textit{RD\_ACK} & Read \textit{ack\_n\_i} and forward it to \textit{sda\_o} (ACK/NACK
% from external controller). If \textit{ack\_n\_i} is '0', then go back to
% \textit{RD} state, else to \textit{IDLE} state. \\
% \textit{WR\_LOAD\_TXSR} & Load TX shift register with data at \textit{tx\_byte\_i} input
% and go to \textit{WR} state. \\
% \textit{WR} & Shift out the eight bits of the TXSR starting with MSB and go to
% \textit{WR\_ACK} state. TXSR shifts left on falling edge of SCL. When
% eight bits have been shifted out, \textit{done\_p\_o} is set.\\
% \textit{WR\_ACK} & Read ACK bit sent by master. If '0', go back to \textit{WR} state, otherwise
% go to \textit{IDLE} state. \\
% \hline
% \end{tabular}
% }
%\end{table}
The inhibit signal is also cleared on these two conditions, as the master would
follow up by sending an address byte relevant to the slave module.
%==============================================================================
% Bibliography
......
......@@ -5,11 +5,11 @@
%---------------------------------------------------------------
% title
%---------------------------------------------------------------
\noindent{\LARGE \textbf{VBCP to Wishbone bridge}}
\noindent{\LARGE \textbf{I$^2$C to Wishbone bridge}}
\noindent \rule{\textwidth}{.1cm}
\hfill\today
\hfill 18 Dec. 2013
\vspace*{3cm}
......
......@@ -10,7 +10,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="647.03162"
width="619.46588"
height="366.34814"
id="svg2"
version="1.1"
......@@ -18,6 +18,19 @@
sodipodi:docname="fsm.svg">
<defs
id="defs4">
<marker
inkscape:stockid="TriangleInM"
orient="auto"
refY="0.0"
refX="0.0"
id="TriangleInM"
style="overflow:visible">
<path
id="path4180"
d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
transform="scale(-0.4)" />
</marker>
<marker
inkscape:stockid="TriangleOutM"
orient="auto"
......@@ -48,9 +61,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="233.79285"
inkscape:cy="219.89173"
inkscape:zoom="1.4"
inkscape:cx="172.95624"
inkscape:cy="160.43646"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
......@@ -80,7 +93,7 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-80.908226,-95.838081)">
transform="translate(-83.725204,-95.838081)">
<g
id="g3791">
<path
......@@ -117,7 +130,7 @@
sodipodi:cy="225.21933"
sodipodi:rx="160.45929"
sodipodi:ry="103.82829"
d="m 377.60214,225.21933 a 160.45929,103.82829 0 1 1 -320.918577,0 160.45929,103.82829 0 1 1 320.918577,0 z"
d="m 377.60214,225.21933 c 0,57.34278 -71.84007,103.82829 -160.45929,103.82829 -88.61922,0 -160.459287,-46.48551 -160.459287,-103.82829 0,-57.34278 71.840067,-103.82829 160.459287,-103.82829 88.61922,0 160.45929,46.48551 160.45929,103.82829 z"
transform="matrix(0.32486115,0,0,0.16396873,190.54322,103.94267)" />
<text
xml:space="preserve"
......@@ -331,27 +344,27 @@
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="80.46682"
y="141.33536"
x="83.244736"
y="122.90007"
id="text4712"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4714"
x="80.46682"
y="141.33536"
style="font-size:8px">done='0'</tspan></text>
x="83.244736"
y="122.90007"
style="font-size:8px">addr_good = '0'</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4716"
y="123.73908"
x="221.63564"
x="203.95796"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:8px"
y="123.73908"
x="221.63564"
x="203.95796"
id="tspan4718"
sodipodi:role="line">done='1'</tspan></text>
sodipodi:role="line">addr_good = '1'</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
......@@ -433,15 +446,15 @@
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="386.4949"
x="411.74872"
y="260.70016"
id="text5490"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5492"
x="386.4949"
x="411.74872"
y="260.70016"
style="font-size:8px">op = start_op</tspan></text>
style="font-size:8px">op = '0'</tspan></text>
<text
sodipodi:linespacing="125%"
id="text5494"
......@@ -453,7 +466,7 @@
y="260.70016"
x="553.17004"
id="tspan5496"
sodipodi:role="line">op /= start_op</tspan></text>
sodipodi:role="line">op = '1'</tspan></text>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
......@@ -481,14 +494,14 @@
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="677.19373"
y="390.0943"
x="652.44501"
y="373.42679"
id="text5506"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5508"
x="677.19373"
y="390.0943"
x="652.44501"
y="373.42679"
style="font-size:8px">byte_cnt &lt; 3</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutM)"
......@@ -514,27 +527,6 @@
x="360.84262"
y="352.21359"
style="font-size:8px">byte_cnt = 3</tspan></text>
<text
sodipodi:linespacing="125%"
id="text5884"
y="429.46619"
x="382.80508"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:8px;text-align:center;text-anchor:middle"
y="429.46619"
x="382.80508"
sodipodi:role="line"
id="tspan5888">I<tspan
style="font-size:65.00091553%;text-align:center;text-anchor:middle;baseline-shift:super"
id="tspan4982">2</tspan>C stop condition</tspan><tspan
style="font-size:8px;text-align:center;text-anchor:middle"
y="439.46619"
x="382.80508"
sodipodi:role="line"
id="tspan4978"><tspan
style="font-style:italic;text-align:center;text-anchor:middle"
id="tspan4980">or </tspan>wb_err</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
......@@ -614,24 +606,15 @@
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="382.80508"
x="402.50305"
y="429.46619"
id="text5864"
sodipodi:linespacing="125%"><tspan
id="tspan5866"
sodipodi:role="line"
x="382.80508"
y="429.46619"
style="font-size:8px;text-align:center;text-anchor:middle">I<tspan
id="tspan5868"
style="font-size:65.00091553%;text-align:center;text-anchor:middle;baseline-shift:super">2</tspan>C stop condition</tspan><tspan
id="tspan5870"
sodipodi:role="line"
x="382.80508"
y="439.46619"
style="font-size:8px;text-align:center;text-anchor:middle"><tspan
id="tspan5872"
style="font-style:italic;text-align:center;text-anchor:middle">or </tspan>wb_err</tspan></text>
x="402.50305"
y="429.46619"
style="font-size:8px;text-align:center;text-anchor:middle">wb_err</tspan></text>
<text
sodipodi:linespacing="125%"
id="text5874"
......@@ -644,5 +627,24 @@
x="479.57578"
id="tspan5876"
sodipodi:role="line">wb_ack = '1'</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#TriangleInM)"
d="m 164.53741,160.15061 0,39.39595"
id="path3082"
inkscape:connector-curvature="0" />
<text
sodipodi:linespacing="125%"
id="text4486"
y="209.26811"
x="136.02521"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:8px"
y="209.26811"
x="136.02521"
id="tspan4488"
sodipodi:role="line">I<tspan
style="font-size:65%;baseline-shift:super"
id="tspan4490">2</tspan>C stop condition</tspan></text>
</g>
</svg>
......@@ -6,6 +6,9 @@
% Color package
\usepackage[usenames,dvipsnames]{color}
% Appendix package
\usepackage[toc,page]{appendix}
% Hyperrefs
\usepackage[
colorlinks = true,
......@@ -55,6 +58,7 @@
22-10-2013 & 0.03 & Added \textit{Access commands} section, updated document according to
changes in protocol \\
29-10-2013 & 0.04 & Changed PDF link colors \\
18-12-2013 & 1.00 & Finite version with watchdog timer and robust communication \\
\hline
\end{tabular}
}
......@@ -74,7 +78,7 @@
\section*{List of Abbreviations}
\begin{tabular}{l l}
FSM & Finite-State Machine \\
VBCP & Inter-Integrated Circuit (bus) \\
I$^2$C & Inter-Integrated Circuit (bus) \\
SysMon & ELMA crate System Monitor board \\
VME & VERSAmodule Eurocard \\
\end{tabular}
......@@ -89,23 +93,23 @@
\section{Introduction}
\label{sec:intro}
This document describes the \textit{vbcp\_wb} module, a VME Board Control Protocol (VBCP) to Wishbone
This document describes the \textit{wb\_i2c\_bridge} module, an I$^2$C to Wishbone
bridge HDL core for VME64x crates from ELMA. These crates offer the possibility of accessing
boards in VME slots via either VME, or VBCP. Boards not using the VME lines
on a slot can implement the \textit{vbcp\_wb} module on an FPGA; implements an
VBCP slave and translates VBCP accesses into Wishbone \cite{wb-spec} accesses to a
Wishbone slave device.
boards in VME slots via either VME, or I$^2$C. Boards not using the VME lines
on a slot can implement the \textit{wb\_i2c\_bridge} module on an FPGA. This module
implements an I$^2$C slave and translates I$^2$C accesses into Wishbone \cite{wb-spec}
accesses to a Wishbone slave device.
A typical system where the \textit{vbcp\_wb} module is employed is shown in
A typical system where the \textit{wb\_i2c\_bridge} module is employed is shown in
Figure~\ref{fig:sys}. ELMA VME crates contain a SysMon (system monitor) board~\cite{sysmon},
that is mainly used for monitoring VME voltages and controlling the fans of the VME crate.
The SysMon can be connected to via either a serial connection or Telnet. Then, sending
specific commands (see Section \ref{sec:testing}) via one of the two are translated by the
SysMon into VBCP accesses following the protocol described in Section~\ref{sec:vbcp}.
SysMon into I$^2$C accesses following the protocol described in Section~\ref{sec:elma-prot}.
\begin{figure}[h]
\centerline{\includegraphics[width=\textwidth]{fig/sys}}
\caption{Typical system for the \textit{vbcp\_wb} module}
\caption{Typical system for the \textit{wb\_i2c\_bridge} module}
\label{fig:sys}
\end{figure}
......@@ -115,13 +119,13 @@ SysMon into VBCP accesses following the protocol described in Section~\ref{sec:v
\section{Instantiation}
\label{sec:instantiation}
The ports of the \textit{vbcp\_wb} module are shown in Table~\ref{tbl:ports}.
The ports of the \textit{wb\_i2c\_bridge} module are shown in Table~\ref{tbl:ports}.
The I$^2$C signals should be connected to tri-state ports, as shown in
Figure~\ref{fig:i2c-ports}; Wishbone slaves should be connected to the
Wishbone master interface ports, prefixed with \textit{wbm}.
\begin{table}[h]
\caption{Ports of \textit{vbcp\_wb} module}
\begin{table}[hbtp]
\caption{Ports of \textit{wb\_i2c\_bridge} module}
\label{tbl:ports}
\centerline
{
......@@ -137,12 +141,14 @@ Wishbone master interface ports, prefixed with \textit{wbm}.
scl\_en\_o & 1 & SCL line tri-state enable \\
scl\_i & 1 & SCL line input \\
scl\_o & 1 & SCL line output \\
i2c\_addr\_i & 7 & VBCP slave address on ELMA VBCP bus \\
i2c\_addr\_i & 7 & I$^2$C slave address on ELMA I$^2$C bus \\
tip\_o & 1 & Transfer In Progress \newline
'1' -- I$^2$C address sent by SysMon matches that of the VBCP slave \newline
'0' -- after transfer has completed and VBCP slave is idle \\
err\_o & 1 & Error bit, high for one \textit{clk\_i} cycle when the Wishbone address
'1' -- I$^2$C address sent by SysMon matches that of the I$^2$C slave \newline
'0' -- after transfer has completed and I$^2$C slave is idle \\
err\_p\_o & 1 & Error bit, high for one \textit{clk\_i} cycle when the Wishbone address
the SysMon tries to access is invalid \\
wdto\_p\_o & 1 & FSM watchdog timer time-out, high for one \textit{clk\_i} cycle when
the FSM watchdog has timed-out \\
wbm\_stb\_o & 1 & Wishbone data strobe output \\
wbm\_cyc\_o & 1 & Wishbone valid cycle output \\
wbm\_sel\_o & 4 & Wishbone byte select output \\
......@@ -160,12 +166,12 @@ Wishbone master interface ports, prefixed with \textit{wbm}.
\begin{figure}[h]
\centerline{\includegraphics[width=.75\textwidth]{fig/i2c-ports}}
\caption{VBCP port external connections}
\caption{I$^2$C port external connections}
\label{fig:i2c-ports}
\end{figure}
%\begin{table}[h]
% \caption{Wishbone datasheet of \textit{vbcp\_wb} module}
% \caption{Wishbone datasheet of \textit{wb\_i2c\_bridge} module}
% \label{tbl:wb-ds}
% \centerline
% {
......@@ -173,7 +179,7 @@ Wishbone master interface ports, prefixed with \textit{wbm}.
% \hline
% \multicolumn{1}{c}{\textbf{Description}} & \multicolumn{1}{c}{\textbf{Specification}} \\
% \hline
% General description & ELMA VBCP to Wishbone bridge \\
% General description & ELMA elma-prot to Wishbone bridge \\
% Supported cycles & Master, read/write \\
% Data port, size & 32-bit \\
% Data port, granularity & 32-bit \\
......@@ -201,21 +207,20 @@ Wishbone master interface ports, prefixed with \textit{wbm}.
%==============================================================================
% SEC: Testing
%==============================================================================
\section{Testing the \textit{vbcp\_wb} module}
\section{Testing the \textit{wb\_i2c\_bridge} module}
\label{sec:testing}
After proper synthesis and download to the FPGA, a Telnet or serial connection
should be made to the SysMon board. Commands can then be sent to the boards via
the SysMon. The two commands relevant for this basic test are \textit{readreg}
and \textit{writereg}. These and other commands relevant for accessing board
registers are outlined in Section~\ref{sec:vbcp-cmds}.
registers are outlined in Section~\ref{sec:elma-prot-cmds}.
The example below shows how to connect to an ELMA crate at IP address 1.2.3.4,
obtaining the value of a register at address 0x10 in a board in VME slot 2,
writing the hex value 0x1234 to the same register and reading it back to check for
proper modification.
\pagebreak
\begin{verbatim}
$ telnet 1.2.3.4
Trying 1.2.3.4...
......@@ -234,20 +239,18 @@ password:**********
%==============================================================================
% SEC: Protocol
%==============================================================================
\section{The VME Board Control Protocol}
\label{sec:vbcp}
\section{Data transfer protocol}
\label{sec:elma-prot}
%------------------------------------------------------------------------------
\subsection{Protocol details}
\label{sec:vbcp-prot}
\label{sec:elma-prot-prot}
The VME backplane provides two serial lines (\textit{SERCLK} and \textit{SERDAT})
on the P1 connector. These lines can be used to access boards placed in a VME
slots to control them, in cases where the VME interface is not implemented.
The VME Board Control Protocol (VBCP)~\cite{sysmon-i2c} has been defined for such
purposes. Using I$^2$C as a low-level protocol, the bytes of a register can be read
from or written to a VME board.
slot to control them, in cases where the VME interface is not implemented.
Using I$^2$C as a low-level protocol and the higher-level protocol defined here,
the bytes of a register can be read from or written to a VME board.
Figure~\ref{fig:sysmon-wr} shows a write operation from the SysMon to a VME
board. The process starts with the control byte, containing the board's
......@@ -280,15 +283,15 @@ are sent by the VME board in big-endian order.
%------------------------------------------------------------------------------
\subsection{Access commands}
\label{sec:vbcp-cmds}
\label{sec:elma-prot-cmds}
In order to send data to a VME board using VBCP, a user connects to the SysMon
via Telnet and sends commands which the SysMon translates into I$^2$C accesses
as outlined in the previous section. The commands supported by the \textit{vbcp\_wb}
module are shown in Table~\ref{tbl:cmds}.
In order to send data to a VME board, a user connects to the SysMon via Telnet
and sends commands which the SysMon translates into I$^2$C accesses as outlined
in the previous section. The commands Telnet commands to send to the SysMon are
shown in Table~\ref{tbl:cmds}.
\begin{table}[h]
\caption{The \textit{readreg} and \textit{writereg} commands}
\caption{SysMon Telnet commands for I$^2$C access}
\label{tbl:cmds}
\centerline
{
......@@ -301,7 +304,7 @@ module are shown in Table~\ref{tbl:cmds}.
writemregs \textit{slot addr v1 .. v8} & This command is similar to the \textit{writereg}
command, but it allows writing up to eight different values
to the same Wishbone register. The values are given in hexadecimal
format and are separate by spaces \\
format and are separated by spaces \\
readreg \textit{slot addr} & Returns the value of register at hex address \textit{addr} of
board in slot number \textit{slot} \\
\hline
......@@ -329,27 +332,31 @@ the VME board after every byte.
As Figure~\ref{fig:writemregs} shows, the data words are sent in little-endian order,
word 0 is sent first, followed by word 1 and so forth, until word 7.
\begin{figure}[h]
\centerline{\includegraphics[scale=.55]{fig/fsm}}
\caption{Main FSM of \textit{wb\_i2c\_bridge} module}
\label{fig:fsm}
\end{figure}
%==============================================================================
% SEC: Implem
%==============================================================================
\pagebreak
\section{Implementation}
\label{sec:implem}
In order to perform low-level I$^2$C transfers, the \textit{i2c\_slave} module
is instantiated and used within the \textit{vbcp\_wb}
module. The outputs of the \textit{i2c\_slave} module are used as controls
for an eight-state finite state machine (FSM), a simplified version of which
is shown in Figure~\ref{fig:fsm}. Table~\ref{tbl:fsm} also lists the states of
the state machine.
In order to perform low-level I$^2$C transfers, the \textit{gc\_i2c\_slave} module
is instantiated and used within the \textit{wb\_i2c\_bridge} module. The outputs
of the \textit{gc\_i2c\_slave} module are used as controls for an eight-state finite
state machine (FSM), a simplified version of which is shown in Figure~\ref{fig:fsm}.
Table~\ref{tbl:fsm} also lists the states of the FSM.
\begin{figure}[h]
\centerline{\includegraphics[scale=.65]{fig/fsm}}
\caption{Main FSM of \textit{vbcp\_wb} module}
\label{fig:fsm}
\end{figure}
Where the SysMon appears in the state names, it indicates what the SysMon action is.
For example, if the state of the FSM is \textit{SYSMON\_WR}, this means the SysMon
is writing and the \textit{wb\_i2c\_bridge} is reading.
\begin{table}[h]
\caption{States of \textit{vbcp\_wb} FSM}
\caption{States of \textit{wb\_i2c\_bridge} FSM}
\label{tbl:fsm}
\centerline
{
......@@ -357,80 +364,87 @@ the state machine.
\hline
\multicolumn{1}{c}{\textbf{State}} & \multicolumn{1}{c}{\textbf{Description}} \\
\hline
IDLE & Wait for the \textit{i2c\_slave} module to receive the VBCP
address and go to \textit{WB\_ADR}. The starting value at the
\textit{op\_o} output of the \textit{i2c\_slave} module is stored
for checking in \textit{OPER} \\
WB\_ADR & Shift in the two address bytes sent via VBCP and go to
IDLE & Wait for the \textit{gc\_i2c\_slave} module to receive the I$^2$C
address and go to \textit{WB\_ADR} \\
WB\_ADR & Shift in the two address bytes sent via I$^2$C and go to
\textit{SIM\_WB\_TRANSF} \\
SIM\_WB\_TRANSF & Start a Wishbone read transfer from address received in previous
state and go to \textit{OPER} if Wishbone address exists (Wishbone
\textit{ack} received), or \textit{IDLE} otherwise (Wishbone \textit{err}
received) \\
OPER & Check the \textit{op\_o} output of the \textit{i2c\_slave} module.
If different from the value at the start, go to \textit{SYSMON\_RD\_WB} state
(SysMon is reading from \textit{vbcp\_wb}), otherwise continue shifting
in bytes (SysMon writing to \textit{vbcp\_wb}) \\
OPER & Check the \textit{op\_o} output of the \textit{gc\_i2c\_slave} module.
If '1', go to \textit{SYSMON\_RD\_WB} state (SysMon is reading from
\textit{wb\_i2c\_bridge}), otherwise continue shifting in bytes (SysMon
writing to \textit{wb\_i2c\_bridge}) \\
SYSMON\_WR & Continue reading up to four bytes sent by the SysMon and go to
\textit{SYSMON\_WR\_WB}\\
SYSMON\_WR\_WB & Perform a Wishbone write transfer to the register with the address obtained in
\textit{WB\_ADR} \\
SYSMON\_RD\_WB & Perform a Wishbone read transfer from the address obtained in
\textit{WB\_ADR} and go to \textit{SYSMON\_RD} \\
SYSMON\_RD & Shift out the four bytes of the Wishbone register when the \textit{i2c\_slave}
SYSMON\_RD & Shift out the four bytes of the Wishbone register when the \textit{gc\_i2c\_slave}
module successfully finishes a write \\
\hline
\end{tabular}
}
\end{table}
When the \textit{i2c\_slave} module finishes a transfer (signaled by a \textit{done\_p\_o} pulse),
the status is checked and if it is as expected (e.g., \textit{address good} while in the
\textit{IDLE} state), the FSM advances to the next state. Where the SysMon appears in the state
names, it indicates what the SysMon action is. For example, if the state of the FSM is
\textit{SYSMON\_WR}, this means the SysMon is writing and the \textit{vbcp\_wb} is reading.
To better understand how the FSM operates, Figures \ref{fig:sysmon-wr-fsm} and
\ref{fig:sysmon-rd-fsm} can be consulted, where the state of the FSM is shown
during reads and writes from the SysMon.
When the SysMon writes (Figure~\ref{fig:sysmon-wr-fsm}), the
\textit{vbcp\_wb} module waits in the \textit{IDLE} state until
\textit{wb\_i2c\_bridge} module waits in the \textit{IDLE} state until
the I$^2$C address is received, then, while in the \textit{WB\_ADR} state,
it shifts in the Wishbone address. A Wishbone transfer is then simulated with
the received the address and if this address exists (a Wishbone \textit{ack}
is received), the first byte is shifted in while in the \textit{OPER} state,
followed by the next three bytes while in the \textit{SYSMON\_WR} state.
Finally, the register is written to in the \textit{SYSMON\_WR\_WB} state.
When the SysMon reads (Figure~\ref{fig:sysmon-rd-fsm}), the first few
steps are the same as for a read. The address is shifted in and
checked in the Wishbone transfer simulation state. In the case of a SysMon
reading from a board, however, the I$^2$C transfer is restarted and the order
is reversed (SysMon starts reading). Thus, while in \textit{OPER}, the FSM
detects a different value of \textit{op\_o} and goes into the
\textit{SYSMON\_RD\_WB} state. The value of the register is read while in this
state, and sent via VBCP in the \textit{SYSMON\_RD} state.
it shifts in the Wishbone address. A Wishbone simulation transfer is performed
from the received address. The simulation transfer is in fact a read transfer
from the address, but the data received from the register is not used in any way.
The purpose of this transfer is only to see if the received address exists, indicated
by a Wishbone \textit{ack} being received as a result of this transfer. If this
\textit{ack} is received, the first byte is shifted in while in the \textit{OPER}
state, followed by the next three bytes while in the \textit{SYSMON\_WR} state. The
register is written to in the \textit{SYSMON\_WR\_WB} state using a Wishbone write
transfer.
To allow for the \textit{writemregs} command, whereby up to eight registers can be
written with one I$^2$C transfer, the FSM goes back to the \textit{SYSMON\_WR} state
if the Wishbone write transfer completed successfully. The FSM will go back into the
\textit{IDLE} state when an I$^2$C stop condition is received, which is sent by
the SysMon after the \textit{writereg} or \textit{writemregs} has been completed.
\begin{figure}[h]
\centerline{\includegraphics[width=\textwidth]{fig/sysmon-wr-fsm}}
\caption{FSM states when the SysMon writes to the \textit{vbcp\_wb}}
\caption{FSM states when the SysMon writes to the \textit{wb\_i2c\_bridge}}
\label{fig:sysmon-wr-fsm}
\end{figure}
\begin{figure}[h]
\centerline{\includegraphics[width=\textwidth]{fig/sysmon-rd-fsm}}
\caption{FSM states when the SysMon reads from the \textit{vbcp\_wb}}
\caption{FSM states when the SysMon reads from the \textit{wb\_i2c\_bridge}}
\label{fig:sysmon-rd-fsm}
\end{figure}
When the SysMon reads (Figure~\ref{fig:sysmon-rd-fsm}), the first few
steps are the same as for a write. The address is shifted in and checked in the
Wishbone transfer simulation state. In the case of a SysMon reading from a board,
however, the I$^2$C transfer is restarted and the order is reversed (SysMon starts
reading). Thus, while in \textit{OPER}, the FSM detects a high value on \textit{op\_o}
corresponding to an I$^2$C read transfer, and goes into the \textit{SYSMON\_RD\_WB}
state. The value of the register is read while in this state, and sent via I$^2$C
in the \textit{SYSMON\_RD} state.
The design also contains an FSM watchdog component, which resets the main FSM
in case of errors in communication. The watchdog timeout value is configured
via the \textit{g\_wdt\_max} generic and can be calculated as outlined in
Appendix~\ref{app:wdto-calc}.
%==============================================================================
% SEC: Synthesis results
%==============================================================================
\section{Synthesis results}
\label{sec:synth-res}
The synthesis results for the \textit{vbcp\_wb} design using \textit{xst}
The synthesis results for the \textit{wb\_i2c\_bridge} design using \textit{xst}
on the Spartan-6 XC6SLX45T are shown in Table~\ref{tbl:synth-res}.
\begin{table}[h]
......@@ -449,6 +463,47 @@ on the Spartan-6 XC6SLX45T are shown in Table~\ref{tbl:synth-res}.
}
\end{table}
%==============================================================================
% Appendix
%==============================================================================
\pagebreak
\begin{appendices}
\section{Watchdog timeout value calculation}
\label{app:wdto-calc}
In order to calculate the maximum watchdog timeout value, the following procedure
should be utilized.
First, the frequency on the I$^2$C communication in ELMA crates is 100~kHz. One
I$^2$C byte transfer always consists in 9 bits (eight bits for data plus one for
acknowledgement). Therefore, one I$^2$C byte is transferred within 90~$\mu$s.
To account for start and stop conditions and to allow for frequency changes on
the bus, one can consider one I$^2$C byte as 10 bits, therefore one I$^2$C
transfer can be considered to take 10~$\mu$s to complete.
Now, taking this into account and the period of the \textit{clk\_i} input,
$T_{clk\_i}$, the number of clock cycles needed to complete one I$^2$C byte transfer
can be calculated as:
\begin{equation}
N_{byte} = \frac{10 {\mu}s}{T_{clk\_i}}
\end{equation}
Within the ELMA crates, a maximum of 35 bytes can be sent through I$^2$C. This
happens when using the \textit{writemregs} command, where one byte is needed
for the I$^2$C address, two for the Wishbone address and a maximum of 32 bytes for
data (8 32-bit registers). Leaving a safety margin, one can calculate the
maximum watchdog timeout value to be the time needed to send 40 bytes via I$^2$C
on the bus:
\begin{equation}
g\_wdt\_max = 40 * N_{byte} = 40 * \frac{10 {\mu}s}{T_{clk\_i}}
\end{equation}
\end{appendices}
%==============================================================================
% Bibliography
%==============================================================================
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="510.19424"
height="199.43625"
id="svg3093"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="inst-clkcross.svg">
<defs
id="defs3095">
<marker
inkscape:stockid="TriangleInM"
orient="auto"
refY="0"
refX="0"
id="TriangleInM"
style="overflow:visible">
<path
id="path3931"
d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="scale(-0.4,-0.4)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="TriangleOutM"
orient="auto"
refY="0"
refX="0"
id="TriangleOutM"
style="overflow:visible">
<path
id="path3940"
d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="scale(0.4,0.4)"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="110.3108"
inkscape:cy="43.525494"
inkscape:document-units="px"
inkscape:current-layer="g3962"
showgrid="true"
inkscape:window-width="1855"
inkscape:window-height="1176"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0">
<inkscape:grid
type="xygrid"
id="grid3128"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
units="mm"
spacingx="1mm"
spacingy="1mm"
originx="-46.152962mm"
originy="-211.85889mm" />
</sodipodi:namedview>
<metadata
id="metadata3098">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-163.53412,-102.24484)">
<g
id="g3944">
<rect
y="113.3858"
x="212.59842"
height="63.779533"
width="95.669289"
id="rect5379"
style="opacity:0.98999999;fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
sodipodi:linespacing="125%"
id="text3910"
y="109.8425"
x="222.18355"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-weight:bold"
y="109.8425"
x="222.18355"
id="tspan3912"
sodipodi:role="line">xwb_crossbar</tspan></text>
<path
inkscape:connector-curvature="0"
id="path3928"
d="m 212.59843,162.9921 7.08661,3.54331 -7.08661,3.54331"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path3930"
d="m 198.4252,166.53541 14.17323,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<text
sodipodi:linespacing="125%"
id="text3932"
y="170.07872"
x="162.99213"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="170.07872"
x="162.99213"
id="tspan3934"
sodipodi:role="line">sysclk</tspan></text>
</g>
<g
id="g3953">
<rect
style="opacity:0.98999999;fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3922"
width="95.669289"
height="63.779533"
x="425.19684"
y="113.3858" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="444.23755"
y="109.8425"
id="text3924"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3926"
x="444.23755"
y="109.8425"
style="font-weight:bold">wb_periph</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 425.19685,162.9921 7.08661,3.54331 -7.08661,3.54331"
id="path3936"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 411.02362,166.53541 14.17323,0"
id="path3938"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="375.59055"
y="170.07872"
id="text3940"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3942"
x="375.59055"
y="170.07872">sysclk</tspan></text>
</g>
<g
id="g3962"
transform="translate(62.455365,124.01575)">
<rect
y="113.3858"
x="515.1037"
height="63.779533"
width="95.669289"
id="rect3964"
style="opacity:0.98999999;fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
sodipodi:linespacing="125%"
id="text3966"
y="109.8425"
x="515.55554"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-weight:bold"
y="109.8425"
x="515.55554"
id="tspan3968"
sodipodi:role="line">wb_xil_multiboot</tspan></text>
<path
inkscape:connector-curvature="0"
id="path3970"
d="m 515.10369,162.9921 7.08661,3.54331 -7.08661,3.54331"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path3972"
d="m 500.93046,166.53541 14.17323,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<text
sodipodi:linespacing="125%"
id="text3974"
y="170.07872"
x="470.36484"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="170.07872"
x="470.36484"
id="tspan3976"
sodipodi:role="line">clk20</tspan></text>
</g>
<rect
style="opacity:0.98999999;fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3980"
width="95.669289"
height="63.779533"
x="425.19684"
y="237.40155" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="421.95239"
y="233.85825"
id="text3982"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3984"
x="421.95239"
y="233.85825"
style="font-weight:bold">wb_clock_crossing</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 425.19685,276.37791 7.08661,3.54331 -7.08661,3.54331"
id="path3986"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 411.02362,279.92122 14.17323,0"
id="path3988"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="375.59055"
y="283.46454"
id="text3990"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3992"
x="375.59055"
y="283.46454">sysclk</tspan></text>
<path
inkscape:connector-curvature="0"
id="path4001"
d="m 425.19685,290.55114 7.08661,3.54331 -7.08661,3.54331"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4003"
d="m 411.02362,294.09445 14.17323,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<text
sodipodi:linespacing="125%"
id="text4005"
y="297.63779"
x="379.13385"
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="297.63779"
x="379.13385"
id="tspan4007"
sodipodi:role="line">clk20</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#TriangleInM);marker-end:url(#TriangleOutM)"
d="m 315.35433,145.27557 102.75591,0"
id="path4009"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#TriangleOutM)"
d="m 361.63461,145.75027 0,105.82451 56.47563,0"
id="path4379"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4565"
d="m 527.95275,251.57478 42.51969,0"
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#TriangleInM);marker-end:url(#TriangleOutM)" />
</g>
</svg>
......@@ -10,7 +10,7 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1369.6704"
height="488.19138"
height="491.74316"
id="svg4861"
version="1.1"
inkscape:version="0.48.3.1 r9886"
......@@ -56,9 +56,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.62252069"
inkscape:cx="641.48216"
inkscape:cy="14.248589"
inkscape:zoom="0.8803772"
inkscape:cx="663.34033"
inkscape:cy="331.27563"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
......@@ -83,8 +83,8 @@
units="mm"
spacingx="1mm"
spacingy="1mm"
originx="86.382395mm"
originy="-175.11233mm" />
originx="86.382396mm"
originy="-174.75165mm" />
</sodipodi:namedview>
<metadata
id="metadata4866">
......@@ -102,28 +102,28 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(306.07935,56.305975)">
transform="translate(306.07935,58.579767)">
<rect
style="opacity:0.98999999;fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1.75995231;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect5379"
width="249.44205"
height="155.90128"
x="-139.41925"
y="119.2029" />
y="-38.972187" />
<text
xml:space="preserve"
style="font-size:17.59952164px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="-89.599319"
y="112.96685"
y="-45.208241"
id="text5381"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5383"
x="-89.599319"
y="112.96685"
y="-45.208241"
style="font-weight:bold">multiboot_regs</tspan></text>
<rect
y="119.2029"
y="-38.972187"
x="191.09149"
height="155.90128"
width="249.44205"
......@@ -132,12 +132,12 @@
<text
sodipodi:linespacing="125%"
id="text5387"
y="112.96685"
y="-45.208241"
x="244.80432"
style="font-size:17.59952164px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-weight:bold"
y="112.96685"
y="-45.208241"
x="244.80432"
id="tspan5389"
sodipodi:role="line">multiboot_fsm</tspan></text>
......@@ -147,21 +147,21 @@
width="249.44205"
height="155.90128"
x="577.72668"
y="-36.698395" />
y="-38.972187" />
<text
xml:space="preserve"
style="font-size:17.59952164px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="648.16248"
y="-42.934464"
y="-45.208256"
id="text5395"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5397"
x="648.16248"
y="-42.934464"
y="-45.208256"
style="font-weight:bold">spi_master</tspan></text>
<rect
y="275.10416"
y="276.38214"
x="578.69897"
height="155.90128"
width="249.44205"
......@@ -170,97 +170,123 @@
<text
sodipodi:linespacing="125%"
id="text5401"
y="268.86813"
y="270.14612"
x="633.85114"
style="font-size:17.59952164px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-weight:bold"
y="268.86813"
y="270.14612"
x="633.85114"
id="tspan5403"
sodipodi:role="line">icap_spartan6</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:3.51990461;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#TriangleInM);marker-end:url(#TriangleOutM)"
d="m -208.01581,200.27157 56.12445,0"
d="m -208.01581,42.096477 56.12445,0"
id="path5405"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path5792"
d="m 122.4949,200.27157 56.12446,0"
d="m 122.4949,42.096477 56.12446,0"
style="fill:none;stroke:#000000;stroke-width:3.51990461;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#TriangleInM);marker-end:url(#TriangleOutM)" />
<path
style="fill:none;stroke:#000000;stroke-width:3.51999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#TriangleInM);marker-end:url(#TriangleOutM)"
d="m 453.54331,177.1653 61.82284,0 0,-132.79503 49.88842,0"
id="path5794"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path5980"
d="m 453.54331,219.68499 61.82284,0 0,130.2518 49.88842,0"
d="m 453.54331,77.952712 61.82284,0 0,272.834648 49.88842,0"
style="fill:none;stroke:#000000;stroke-width:3.51999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#TriangleInM);marker-end:url(#TriangleOutM)" />
<text
xml:space="preserve"
style="font-size:17.59952164px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="-220.48793"
y="194.03549"
y="35.860401"
id="text5982"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5984"
x="-220.48793"
y="194.03549"
y="35.860401"
style="text-align:end;text-anchor:end">Wishbone</tspan><tspan
sodipodi:role="line"
x="-220.48793"
y="216.0349"
y="57.859802"
id="tspan5986"
style="text-align:end;text-anchor:end">interface</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:3.51990461;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#TriangleInM);marker-end:url(#TriangleOutM)"
d="m 839.64081,44.37027 87.30474,0"
d="m 839.64081,42.096479 87.30474,0"
id="path5988"
inkscape:connector-curvature="0" />
<text
sodipodi:linespacing="125%"
id="text6358"
y="50.606327"
y="48.332535"
x="945.65369"
style="font-size:17.59952164px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="text-align:start;text-anchor:start"
y="50.606327"
y="48.332535"
x="945.65369"
sodipodi:role="line"
id="tspan6368">SPI flash chip</tspan><tspan
style="text-align:start;text-anchor:start"
y="72.605728"
y="70.33194"
x="945.65369"
sodipodi:role="line"
id="tspan6366" /></text>
<path
inkscape:connector-curvature="0"
id="path6372"
d="m 839.64081,349.93679 87.30474,0"
d="m 839.64081,351.21478 87.30474,0"
style="fill:none;stroke:#000000;stroke-width:3.51990461;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#TriangleInM);marker-end:url(#TriangleOutM)" />
<text
xml:space="preserve"
style="font-size:17.59952164px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="945.65369"
y="343.70074"
y="344.97873"
id="text6374"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
x="945.65369"
y="343.70074"
y="344.97873"
style="text-align:start;text-anchor:start"
id="tspan6382">Configuration</tspan><tspan
sodipodi:role="line"
x="945.65369"
y="365.70013"
y="366.97812"
style="text-align:start;text-anchor:start"
id="tspan6386">logic</tspan></text>
<path
inkscape:connector-curvature="0"
id="path3815"
d="m 453.54331,7.08657 109.84252,0"
style="fill:none;stroke:#000000;stroke-width:3.51990461;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#TriangleInM);marker-end:url(#TriangleOutM)"
sodipodi:nodetypes="cc" />
<rect
y="276.38214"
x="-139.41925"
height="155.90128"
width="249.44205"
id="rect3817"
style="opacity:0.98999999;fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1.75995231;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
<text
sodipodi:linespacing="125%"
id="text3819"
y="270.14609"
x="-101.38103"
style="font-size:17.59952164px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-weight:bold"
y="270.14609"
x="-101.38103"
id="tspan3821"
sodipodi:role="line">gc_fsm_watchdog</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:3.51999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#TriangleOutM)"
d="m 423.00849,407.09333 198.42519,0 0,-216.14173"
id="path3823"
inkscape:connector-curvature="0"
transform="translate(-306.07935,-56.305975)"
sodipodi:nodetypes="ccc" />
</g>
</svg>
......@@ -58,6 +58,8 @@
\multicolumn{1}{c}{\textbf{Date}} & \multicolumn{1}{c}{\textbf{Version}} & \multicolumn{1}{c}{\textbf{Change}} \\
\hline
28-10-2013 & 0.1 & First draft \\
18-12-2013 & 1.0 & Added WDTO bit to status register and information about the FSM watchdog
mechanism \\
\hline
\end{tabular}
}
......@@ -77,6 +79,7 @@
\section*{List of Abbreviations}
\begin{tabular}{l l}
FPGA & Field-Programmable Gate Array \\
ICAP & Internal Configuration Access Port \\
IPROG & Internal PROGRAM\_B \\
OHWR & Open Hardware Repository \\
PROM & Programmable Read-Only Memory \\
......@@ -99,17 +102,18 @@ PROGRAM\_B) command to the configuration logic of the FPGA. This command trigger
deletion of the FPGA configuration and rewriting it with the new configuration
written to the PROM.
This document describes \textit{xil\_multiboot}, an Open Hardware (OHWR) \cite{ohwr}
This document describes \textit{wb\_xil\_multiboot}, an Open Hardware~\cite{ohwr}
FPGA design that can be used to remotely reprogram a Xilinx Spartan-6 FPGA using
MultiBoot technology.
MultiBoot technology. The core can be found within the \textit{general-cores}
library~\cite{gencores-ohwr} on OHWR.
\begin{figure}[h]
\centerline{\includegraphics[width=\textwidth]{fig/multiboot-bd}}
\label{fig:multiboot-bd}
\caption{Block diagram of \textit{xil\_multiboot} module}
\caption{Block diagram of \textit{wb\_xil\_multiboot} module}
\end{figure}
The main features of the \textit{xil\_multiboot} module are:
The main features of the \textit{wb\_xil\_multiboot} module are:
\begin{itemize}
\item software controls operation of the module
\begin{itemize}
......@@ -128,20 +132,20 @@ The main features of the \textit{xil\_multiboot} module are:
\end{itemize}
\end{itemize}
A block diagram of the \textit{xil\_multiboot} module is shown in Figure~\ref{fig:multiboot-bd}.
A block diagram of the \textit{wb\_xil\_multiboot} module is shown in Figure~\ref{fig:multiboot-bd}.
Users can write bitstream data to a flash by writing each byte of the bitstream to a module register
(in the \textit{multiboot\_regs}) module. Writing to the flash is done via the \textit{spi\_master}
module under the control of the finite-state machine (FSM) module (\textit{multiboot\_fsm}). After the
bitstream has been written to the flash module, a remote reprogramming command is sent
to the configuration logic by setting a bit in one of the control registers. The
Xilinx \textit{ICAP\_SPARTAN6} primitive is the interface between the \textit{xil\_multiboot}
Xilinx \textit{ICAP\_SPARTAN6} primitive is the interface between the \textit{wb\_xil\_multiboot}
module and the FPGA configuration logic.
For the rest of the document, the external PROM chip that the FPGA uses to
program itself will be referred to as flash, since a flash chip was used
as the external PROM during the design of the module. However, this does not
mean \textit{xil\_multiboot} works only with flash chips. Any 8-bit SPI PROM
should be usable with the \textit{xil\_multiboot} design.
mean \textit{wb\_xil\_multiboot} works only with flash chips. Any 8-bit SPI PROM
should be usable with the \textit{wb\_xil\_multiboot} design.
%==============================================================================
% SEC: Instantiation
......@@ -149,7 +153,7 @@ should be usable with the \textit{xil\_multiboot} design.
\section{Instantiation}
\label{sec:instantiation}
Table~\ref{tbl:ports} lists the ports of the \textit{xil\_multiboot} module.
Table~\ref{tbl:ports} lists the ports of the \textit{wb\_xil\_multiboot} module.
In order to instantiate the MultiBoot module, one needs to connect
the Wishbone slave ports to a Wishbone master, such as the \textit{xwb\_crossbar}
Wishbone crossbar module on OHWR \cite{gencores-ohwr}. The SPI ports should be
......@@ -164,7 +168,7 @@ connected directly to the FPGA output ports connected to the flash chip.
\hline
\multicolumn{1}{c}{\textbf{Port}} & \textbf{Size} & \multicolumn{1}{c}{\textbf{Description}} \\
\hline
clk\_i & 1 & Clock input \\
clk\_i & 1 & Clock input (max. 20~MHz) \\
rst\_n\_i & 1 & Active-low reset input \\
wbs\_i & & Wishbone slave interface inputs \\
wbs\_o & & Wishbone slave interface outputs \\
......@@ -182,6 +186,18 @@ library~\cite{gencores-ohwr} needs to be imported into the design. This library
the structures for the Wishbone slave interface ports (\textit{wbs\_i} and \textit{wbs\_o})
are defined.
Further note that the maximum \textit{clk\_i} frequency allowable is 20~MHz, due
to constraints of the ICAP component from Xilinx. Should a greater system clock
frequency be used in the design, the user can instantiate the \textit{wb\_xil\_multiboot}
module using a \textit{wb\_clock\_crossing} component from the OHWR \textit{general-cores}
library~\cite{gencores-ohwr}. This is shown in Figure~\ref{fig:inst-clkcross}.
\begin{figure}
\centerline{\includegraphics[width=\textwidth]{fig/inst-clkcross}}
\caption{Instantiation when the system clock is greater than 20~MHz}
\label{fig:inst-clkcross}
\end{figure}
%==============================================================================
% SEC: Using
%==============================================================================
......@@ -190,10 +206,9 @@ are defined.
\label{sec:instantiation}
For an example project of where the Xilinx MultiBoot module is used, see the
CONV-TTL-BLO project~\cite{ctb-proj}. The firmware of this project, starting from
version 2.0, instantiates the MultiBoot module. The project also contains example
Python scripts for writing a bitstream to the flash. Refer to the project
webpage~\cite{ctb-proj} for more information.
CONV-TTL-BLO project~\cite{ctb-proj}. The firmware of this projectuses the MultiBoot
module. The project also contains example Python scripts for writing a bitstream to
the flash. Refer to the project webpage~\cite{ctb-proj} for more information.
Table~\ref{tbl:workflow} shows the MultiBoot workflow~\cite{xtp059}. See \cite{gen-bitstream}
for pointers on how to generate a MultiBoot bitstream. The address map of the MultiBoot module
......@@ -216,7 +231,7 @@ user should write as part of the MultiBoot workflow.
op-code into the MBBAR register \\
\rownumber & Write the Golden bitstream start address and flash chip read command
op-code into the GBBAR register \\
\rownumber & Unlock the IPROG bit in the FPGA by setting CR.IPROG\_UNL \\
\rownumber & Unlock the IPROG bit in the FPGA by setting CR.IPROG\_UNLOCK \\
\rownumber & Issue a reprogramming command to the FPGA by setting CR.IPROG \\
\hline
\end{tabular}
......@@ -352,13 +367,13 @@ bitstreams for a MultiBoot design.
%------------------------------------------------------------------------------
\subsection{Important note regarding MultiBoot bitstreams}
Users should be aware that they should include the \textit{xil\_multiboot} module
Users should be aware that they should include the \textit{wb\_xil\_multiboot} module
when generating a new MultiBoot bitsream. Otherwise, once a bitstream without
the \textit{xil\_multiboot} module inside it is loaded into the FPGA, the
the \textit{wb\_xil\_multiboot} module inside it is loaded into the FPGA, the
remote reprogramming capability of the FPGA is lost, and the user will need
to use JTAG or other means to program the FPGA with a MultiBoot-enabled design.
Thus, always remember to include the \textit{xil\_multiboot} module in any bitstream
Thus, always remember to include the \textit{wb\_xil\_multiboot} module in any bitstream
generated after the Golden bitstream.
%==============================================================================
......@@ -369,23 +384,13 @@ generated after the Golden bitstream.
A block diagram of the design has already been presented in
Figure~\ref{fig:multiboot-bd}. This section describes the actions of the sub-modules
in the \textit{xil\_multiboot} module. The description is rather high-level,
in the \textit{wb\_xil\_multiboot} module. The description is rather high-level,
some details are omitted for ease of understanding. The main purpose of this
section is for the reader to understand how the MultiBoot module works together with
the flash chip and the configuration logic to achieve FPGA reprogramming, rather
than specifying every detail about the module and its sub-modules.
For more involved details, the user is free to consult the code in the project
repository~\cite{ctb-repo}.
The \textit{multiboot\_fsm} module is at the heart of the design. It implements
a finite-state machine (FSM) with 34 states, which controls operation of the module.
A simplified diagram of the FSM is shown in Figure~\ref{fig:fsm}. The diagram shows the various
phases the FSM is in, and Table~\ref{tbl:fsm} lists these phases. Bear in mind
that each phase may contain multiple FSM states. However, many of these states
are just steps of accessing configuration logic through the Xilinx ICAP module,
so for simplicity they are not listed in this manual. Refer to the code for
more complete description.
than specifying every detail about the module and its sub-modules. For more involved
details, the user is free to consult the code in the project
repository~\cite{gencores-ohwr}.
\begin{figure}[h]
\centerline{\includegraphics[width=.9\textwidth]{fig/fsm}}
......@@ -416,6 +421,15 @@ more complete description.
}
\end{table}
The \textit{multiboot\_fsm} module is at the heart of the design. It implements
a finite-state machine (FSM) with 34 states, which controls operation of the module.
A simplified diagram of the FSM is shown in Figure~\ref{fig:fsm}. The diagram shows the various
phases the FSM is in, and Table~\ref{tbl:fsm} lists these phases. Bear in mind
that each phase may contain multiple FSM states. However, many of these states
are just steps of accessing configuration logic through the Xilinx ICAP module,
so for simplicity they are not listed in this manual. Refer to the code for
more complete description.
%------------------------------------------------------------------------------
\subsection{Sending data to the flash chip}
\label{sec:implem-spi}
......@@ -504,13 +518,13 @@ The Spartan-6 FPGA contains registers which can be read to get the stauts of the
configuration logic. In order to read these registers, a special sequence must be
followed. The sequece (listed in Table 6-1 of~\cite{ug380}) is implemented in the
\textit{multiboot\_fsm}. Table~\ref{tbl:rdcfgreg-seq} lists the sequence users
should follow to read out an FPGA configuration register via the \textit{xil\_multiboot}
should follow to read out an FPGA configuration register via the \textit{wb\_xil\_multiboot}
module.
\setcounter{rownr}{0}
\begin{table}[h]
\caption{Configuration register readout via \textit{xil\_multiboot}}
\caption{Configuration register readout via \textit{wb\_xil\_multiboot}}
\label{tbl:rdcfgreg-seq}
\centerline {
\begin{tabular}{c p{.7\textwidth}}
......@@ -532,7 +546,7 @@ module.
}
\end{table}
When the user sets the RDCFGREG bit in the \textit{xil\_multiboot} control register (CR),
When the user sets the RDCFGREG bit in the \textit{wb\_xil\_multiboot} control register (CR),
the \textit{multiboot\_fsm} initiates the configuration register readout sequence.
It first sends a synchronization word, and then takes the value of CFGREGADR from
the CR and use it to build a Type 1 configuration frame to read the configuration
......@@ -543,14 +557,14 @@ continues to perform the final steps of the configuration register readout seque
prior to returning to IDLE.
Note that some configuration registers in the Spartan-6 FPGA are more than 16 bits wide.
The \textit{xil\_multiboot} module does not support reading the full length of the
The \textit{wb\_xil\_multiboot} module does not support reading the full length of the
registers; it can only return the least significant 16 bits of the registers.
%------------------------------------------------------------------------------
\subsection{Sending the IPROG command}
Table~\ref{tbl:iprog} lists the actions needed to issue the IPROG command to the
FPGA using the \textit{xil\_multiboot} module. When the IPROG bit is set in the CR,
FPGA using the \textit{wb\_xil\_multiboot} module. When the IPROG bit is set in the CR,
the \textit{multiboot\_fsm} handles sending the IPROG sequence (Table 7-1,
p.130~\cite{ug380}) to the ICAP.
......@@ -587,13 +601,29 @@ an IPROG succeeds. This version number can be stored into a read-only register i
FPGA and read after the IPROG command. An example of this is given in the CONV-TTL-BLO
project~\cite{ctb-proj}.
%------------------------------------------------------------------------------
\subsection{FSM watchdog timer}
An FSM watchdog timer component (\textit{gc\_fsm\_watchdog} on OHWR) is instantiated
in the design. This component is used to reset the main FSM in case an error
occurs and the FSM stalls waiting for an action. The timeout value of the
watchdog timer is set to 512, since it was established from the component's
simulation that the phase of the FSM that would take the longest number of
cycles to complete (the SPI phase) would complete and return to IDLE
within 218 clock cycles. A safe value of 512 was selected to allow some tolerance
to the FSM, while making sure that it would return to its IDLE state in
case of errors.
When the FSM watchdog fires, the SR.WDTO bit is set. This bit can be cleared by
writing a '1' to it.
%==============================================================================
% SEC: Modifying
%==============================================================================
\section{Modifying the design}
\label{sec:modify}
The \textit{xil\_multiboot} module is purposely modular in case users want to
The \textit{wb\_xil\_multiboot} module is purposely modular in case users want to
interface to different FPGA interconnect standards, or different flash chips.
In order to make modifications to the design, knowledge of VHDL is required.
......@@ -610,13 +640,13 @@ the steps to be followed are listed in Table~\ref{tbl:ch-intercon}.
\hline
\textbf{Step} & \multicolumn{1}{c}{\textbf{Action}} \\
\hline
\rownumber & Change \textit{wbs\_i} and \textit{wbs\_o} in \textit{xil\_multiboot}
\rownumber & Change \textit{wbs\_i} and \textit{wbs\_o} in \textit{wb\_xil\_multiboot}
ports to the preferred interconnect ports \\
\rownumber & Implement or change the current \textit{multiboot\_regs}
module, keeping the interface to the FSM side (e.g., the
\textit{multiboot\_cr\_iprog\_o} port, etc.) \\
\rownumber & Instantiate the new \textit{multiboot\_regs} module into the
\textit{xil\_multiboot} module \\
\textit{wb\_xil\_multiboot} module \\
\hline
\end{tabular}
}
......@@ -649,7 +679,7 @@ performed in case these SPI settings need to be changed.
Another potential addition to the design would be the capability of reading
the full value of all FPGA configuration registers. As outlined in
Section~\ref{sec:implem-rdcfgreg}, some configuration registers are more than
16 bits in length, and the \textit{xil\_multiboot} module cannot return their full
16 bits in length, and the \textit{wb\_xil\_multiboot} module cannot return their full
value. This can be modified by, implementing an extra COUNT field in the CR;
the \textit{multiboot\_fsm} can then use this field to build a Type 1 configuration
package to return the full length of the configuration register. More information
......@@ -661,7 +691,7 @@ on this can be found in the Configuration Packets section of~\cite{ug380}.
\section{Synthesis results}
\label{sec:synth-res}
The synthesis results for the \textit{xil\_multiboot} design using \textit{xst}
The synthesis results for the \textit{wb\_xil\_multiboot} design using \textit{xst}
on the Spartan-6 XC6SLX45T are shown in Table~\ref{tbl:synth-res}.
\begin{table}[h]
......@@ -716,7 +746,7 @@ sections detail the fields of each register.
\textbf{Bits} & \textbf{Field} & \textbf{Access} & \textbf{Default} & \textbf{Description} \\
31..18 & \textit{Reserved} & -- & X & \\
17 & IPROG & R/W & 0 & IPROG bit \\
16 & IPROG\_UNL & R/W & 0 & IPROG unlock bit \\
16 & IPROG\_UNLOCK & R/W & 0 & IPROG unlock bit \\
15..7 & \textit{Reserved} & -- & X & \\
6 & RDCFGREG & R/W & 0 & Read config register \\
5..0 & CFGREGADR & R/W & 0 & Config register address \\
......@@ -731,7 +761,7 @@ sections detail the fields of each register.
\textit{Reserved} & Write as '0'; read undefined \\
IPROG & When 1, it triggers the FSM to send the IPROG command to the ICAP controller \newline
This bit needs to be unlocked by setting the IPROG\_UNL bit in a previous cycle \\
IPROG\_UNL & Unlock bit for the IPROG command. This bit needs to be set to 1 prior to writing
IPROG\_UNLOCK & Unlock bit for the IPROG command. This bit needs to be set to 1 prior to writing
the IPROG bit \\
RDCFGREG & Initiate a read from the FPGA configuration register at address CFGREGADR \newline
This bit is automatically cleared by hardware \\
......@@ -741,13 +771,14 @@ sections detail the fields of each register.
}
%------------------------------------------------------------------------------
\subsection{IMGR -- Image Register}
\label{app:imgr}
\subsection{SR -- Status Register}
\label{app:sr}
\begin{tabular}{l l c c l}
\textbf{Bits} & \textbf{Field} & \textbf{Access} & \textbf{Default} & \textbf{Description} \\
31..17 & \textit{Reserved} & -- & X & \\
16 & VALID & R/O & 0 & Image register is valid \\
31..18 & \textit{Reserved} & -- & X & \\
17 & WDTO & R/W & 0 & FSM watchdog timeout \\
16 & IMGVALID & R/O & 0 & Image register is valid \\
15..0 & CFGREGIMG & R/O & 0 & Config. register image \\
\end{tabular}
......@@ -759,7 +790,9 @@ sections detail the fields of each register.
\textbf{Field} & \textbf{Description} \\
\textit{Reserved} & Write as '0'; read undefined \\
VALID & A read has been performed from the FPGA configuration
WDTO & The FSM watchdog timer has timed out and reset the main FSM \newline
This bit can be cleared by writing a '1' to it \\
IMGVALID & A read has been performed from the FPGA configuration
register at address CR.CFGREGADR, and its value is
present in CFGREGIMG \\
CFGREGIMG & Contains the value of the FPGA configuration register;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment