<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>243</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>246</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>243</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>246</b><br />
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://oldwiki.cpcwiki.eu/index.php?action=history&amp;feed=atom&amp;title=VHDL_implementation_of_the_6845</id>
		<title>VHDL implementation of the 6845 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://oldwiki.cpcwiki.eu/index.php?action=history&amp;feed=atom&amp;title=VHDL_implementation_of_the_6845"/>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;action=history"/>
		<updated>2026-08-29T10:06:58Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=65814&amp;oldid=prev</id>
		<title>MacDeath at 22:16, 19 December 2010</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=65814&amp;oldid=prev"/>
				<updated>2010-12-19T22:16:26Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 22:16, 19 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L686&quot; &gt;Line 686:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 686:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Graphic]][[Category:CPC Internal Components]][[Category:Electronic Component]][[Category:DIY]][[Category:Programming]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Graphic]][[Category:CPC Internal Components]][[Category:Electronic Component]][[Category:DIY]][[Category:Programming&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]][[Category:Emulator&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:65811:newid:65814 --&gt;
&lt;/table&gt;</summary>
		<author><name>MacDeath</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=65811&amp;oldid=prev</id>
		<title>MacDeath at 22:13, 19 December 2010</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=65811&amp;oldid=prev"/>
				<updated>2010-12-19T22:13:36Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 22:13, 19 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L686&quot; &gt;Line 686:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 686:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Hardware&lt;/del&gt;]][[Category:CPC Internal Components]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Graphic&lt;/ins&gt;]][[Category:CPC Internal Components&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]][[Category:Electronic Component]][[Category:DIY]][[Category:Programming&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:40311:newid:65811 --&gt;
&lt;/table&gt;</summary>
		<author><name>MacDeath</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=40311&amp;oldid=prev</id>
		<title>MacDeath at 21:36, 27 January 2010</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=40311&amp;oldid=prev"/>
				<updated>2010-01-27T21:36:03Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:36, 27 January 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L686&quot; &gt;Line 686:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 686:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Hardware]][[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Built in Hardware&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Hardware]][[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;CPC Internal Components&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:40023:newid:40311 --&gt;
&lt;/table&gt;</summary>
		<author><name>MacDeath</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=40023&amp;oldid=prev</id>
		<title>MacDeath at 14:07, 27 January 2010</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=40023&amp;oldid=prev"/>
				<updated>2010-01-27T14:07:17Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 14:07, 27 January 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L686&quot; &gt;Line 686:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 686:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Hardware]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Hardware]][[Category:Built in &lt;/ins&gt;Hardware]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:33041:newid:40023 --&gt;
&lt;/table&gt;</summary>
		<author><name>MacDeath</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=33041&amp;oldid=prev</id>
		<title>MacDeath at 22:29, 8 October 2009</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=33041&amp;oldid=prev"/>
				<updated>2009-10-08T22:29:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 22:29, 8 October 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This code can be used to implement an &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;CRTC6845 &lt;/del&gt;in a CPLD or a FPGA. It consists of three files (config.vhd, crtc6845.vhd, cursor.vhd). You can also directly download the [[Media:Crtc6845 VHDL.zip | source files]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This code can be used to implement an &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[CRTC]]6845 &lt;/ins&gt;in a CPLD or a FPGA. It consists of three files (config.vhd, crtc6845.vhd, cursor.vhd). You can also directly download the [[Media:Crtc6845 VHDL.zip | source files]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''config.vhd'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''config.vhd'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:31914:newid:33041 --&gt;
&lt;/table&gt;</summary>
		<author><name>MacDeath</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=31914&amp;oldid=prev</id>
		<title>Octoate: Created page with 'This code can be used to implement an CRTC6845 in a CPLD or a FPGA. It consists of three files (config.vhd, crtc6845.vhd, cursor.vhd). You can also directly download the [[Media:…'</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=VHDL_implementation_of_the_6845&amp;diff=31914&amp;oldid=prev"/>
				<updated>2009-09-23T16:24:27Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;This code can be used to implement an CRTC6845 in a CPLD or a FPGA. It consists of three files (config.vhd, crtc6845.vhd, cursor.vhd). You can also directly download the [[Media:…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This code can be used to implement an CRTC6845 in a CPLD or a FPGA. It consists of three files (config.vhd, crtc6845.vhd, cursor.vhd). You can also directly download the [[Media:Crtc6845 VHDL.zip | source files]].&lt;br /&gt;
&lt;br /&gt;
'''config.vhd'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--===========================================================================--&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  S Y N T H E S I Z A B L E    CRTC6845   C O R E                          --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  www.opencores.org - January 2000                                         --&lt;br /&gt;
--  This IP core adheres to the GNU public license.                          --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  VHDL model of MC6845 compatible CRTC                                     --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  This model doesn't implement interlace mode. Everything else is          --&lt;br /&gt;
--  (probably) according to original MC6845 data sheet (except VTOTADJ).     --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  Implementation in Xilinx Virtex XCV50-6 runs at 50 MHz (character clock).--&lt;br /&gt;
--  With external pixel	generator this CRTC could handle 450MHz pixel rate   --&lt;br /&gt;
--  (see MC6845 datasheet for typical application).	                     --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  Author: Damjan Lampret, lampret@opencores.org                            --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  TO DO:                                                                   --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - fix REG_INIT and remove non standard signals at topl level entity.    --&lt;br /&gt;
--     Allow fixed registers values (now set with REG_INIT). Anyway cleanup  --&lt;br /&gt;
--     required.                                                             --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - split design in four units (horizontal sync, vertical sync, bus       --&lt;br /&gt;
--     interface and the rest)                                               --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - synthesis with Synplify pending (there are some problems with         --&lt;br /&gt;
--     UNSIGNED and BIT_LOGIC_VECTOR types in some units !)                  --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - testbench                                                             --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - interlace mode support, extend VSYNC for V.Total Adjust value (R5)    --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - verification in a real application                                    --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--===========================================================================--&lt;br /&gt;
&lt;br /&gt;
library IEEE;&lt;br /&gt;
use IEEE.std_logic_1164.all;&lt;br /&gt;
use IEEE.std_logic_arith.all;&lt;br /&gt;
use IEEE.math_real.all;&lt;br /&gt;
&lt;br /&gt;
package CONFIG is&lt;br /&gt;
&lt;br /&gt;
	-- Don't change these unless you know what you are doing.&lt;br /&gt;
	constant MA_WIDTH	: INTEGER	:= 14;&lt;br /&gt;
	constant RA_WIDTH	: INTEGER	:= 5;&lt;br /&gt;
	constant DB_WIDTH	: INTEGER	:= 8;&lt;br /&gt;
	constant AR_WIDTH	: INTEGER	:= 5;&lt;br /&gt;
	&lt;br /&gt;
	constant INDEX_HT	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;0&amp;quot;;&lt;br /&gt;
	constant INDEX_HD	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;1&amp;quot;;&lt;br /&gt;
	constant INDEX_HSP	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;2&amp;quot;;&lt;br /&gt;
	constant INDEX_HSW	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;3&amp;quot;;&lt;br /&gt;
	constant INDEX_VT	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;4&amp;quot;;&lt;br /&gt;
	constant INDEX_ADJ	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;5&amp;quot;;&lt;br /&gt;
	constant INDEX_VD	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;6&amp;quot;;&lt;br /&gt;
	constant INDEX_VSP	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;7&amp;quot;;&lt;br /&gt;
	constant INDEX_IM	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;8&amp;quot;;&lt;br /&gt;
	constant INDEX_SL	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;9&amp;quot;;&lt;br /&gt;
	constant INDEX_CURST	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;a&amp;quot;;&lt;br /&gt;
	constant INDEX_CUREND	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;b&amp;quot;;&lt;br /&gt;
	constant INDEX_SA_H	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;c&amp;quot;;&lt;br /&gt;
	constant INDEX_SA_L	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;d&amp;quot;;&lt;br /&gt;
	constant INDEX_CUR_H	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;e&amp;quot;;&lt;br /&gt;
	constant INDEX_CUR_L	: STD_LOGIC_VECTOR (4 downto 0)	:= '0' &amp;amp; x&amp;quot;f&amp;quot;;&lt;br /&gt;
	constant INDEX_LP_H	: STD_LOGIC_VECTOR (4 downto 0)	:= '1' &amp;amp; x&amp;quot;0&amp;quot;;&lt;br /&gt;
	constant INDEX_LP_L	: STD_LOGIC_VECTOR (4 downto 0)	:= '1' &amp;amp; x&amp;quot;1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	-- Convert UNSIGNED type to STD_LOGIC_VECTOR type&lt;br /&gt;
	function MAKE_BINARY(A : UNSIGNED) return STD_LOGIC_VECTOR;&lt;br /&gt;
	-- Convert STD_LOGIC_VECTOR type to UNSIGNED type&lt;br /&gt;
	function MAKE_UNSIGNED(A : STD_LOGIC_VECTOR) return UNSIGNED;&lt;br /&gt;
	&lt;br /&gt;
end CONFIG;&lt;br /&gt;
&lt;br /&gt;
package body CONFIG is&lt;br /&gt;
&lt;br /&gt;
   -- synopsys synthesis_off&lt;br /&gt;
    type tbl_type is array (STD_ULOGIC) of STD_ULOGIC;&lt;br /&gt;
    constant tbl_BINARY : tbl_type :=&lt;br /&gt;
	('X', 'X', '0', '1', 'X', 'X', '0', '1', 'X');&lt;br /&gt;
    -- synopsys synthesis_on&lt;br /&gt;
&lt;br /&gt;
    function MAKE_BINARY(A : UNSIGNED) return STD_LOGIC_VECTOR is&lt;br /&gt;
	-- synopsys built_in SYN_FEED_THRU&lt;br /&gt;
	variable one_bit : STD_ULOGIC;&lt;br /&gt;
	variable result : STD_LOGIC_VECTOR (A'range);&lt;br /&gt;
    begin&lt;br /&gt;
	-- synopsys synthesis_off&lt;br /&gt;
	    for i in A'range loop&lt;br /&gt;
		result(i) := tbl_BINARY(A(i));&lt;br /&gt;
	    end loop;&lt;br /&gt;
	    return result;&lt;br /&gt;
	-- synopsys synthesis_on&lt;br /&gt;
    end;&lt;br /&gt;
&lt;br /&gt;
    function MAKE_UNSIGNED(A : STD_LOGIC_VECTOR) return UNSIGNED is&lt;br /&gt;
	-- synopsys built_in SYN_FEED_THRU&lt;br /&gt;
	variable one_bit : STD_ULOGIC;&lt;br /&gt;
	variable result : UNSIGNED (A'range);&lt;br /&gt;
    begin&lt;br /&gt;
	-- synopsys synthesis_off&lt;br /&gt;
	    for i in A'range loop&lt;br /&gt;
		result(i) := tbl_BINARY(A(i));&lt;br /&gt;
	    end loop;&lt;br /&gt;
	    return result;&lt;br /&gt;
	-- synopsys synthesis_on&lt;br /&gt;
    end;&lt;br /&gt;
    &lt;br /&gt;
end CONFIG;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''crtc6845.vhd'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--===========================================================================--&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  S Y N T H E S I Z A B L E    CRTC6845   C O R E                          --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  www.opencores.org - January 2000                                         --&lt;br /&gt;
--  This IP core adheres to the GNU public license.                          --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  VHDL model of MC6845 compatible CRTC                                     --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  This model doesn't implement interlace mode. Everything else is          --&lt;br /&gt;
--  (probably) according to original MC6845 data sheet (except VTOTADJ).     --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  Implementation in Xilinx Virtex XCV50-6 runs at 50 MHz (character clock).--&lt;br /&gt;
--  With external pixel	generator this CRTC could handle 450MHz pixel rate   --&lt;br /&gt;
--  (see MC6845 datasheet for typical application).	                     --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  Author: Damjan Lampret, lampret@opencores.org                            --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  TO DO:                                                                   --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - fix REG_INIT and remove non standard signals at topl level entity.    --&lt;br /&gt;
--     Allow fixed registers values (now set with REG_INIT). Anyway cleanup  --&lt;br /&gt;
--     required.                                                             --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - split design in four units (horizontal sync, vertical sync, bus       --&lt;br /&gt;
--     interface and the rest)                                               --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - synthesis with Synplify pending (there are some problems with         --&lt;br /&gt;
--     UNSIGNED and BIT_LOGIC_VECTOR types in some units !)                  --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - testbench                                                             --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - interlace mode support, extend VSYNC for V.Total Adjust value (R5)    --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - verification in a real application                                    --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--===========================================================================--&lt;br /&gt;
&lt;br /&gt;
library IEEE;&lt;br /&gt;
use IEEE.std_logic_1164.all;&lt;br /&gt;
use IEEE.std_logic_arith.all;&lt;br /&gt;
use work.config.all;&lt;br /&gt;
&lt;br /&gt;
entity crtc6845 is&lt;br /&gt;
    port (&lt;br /&gt;
	MA     : out STD_LOGIC_VECTOR (MA_WIDTH-1 downto 0);&lt;br /&gt;
	RA     : out STD_LOGIC_VECTOR (RA_WIDTH-1 downto 0);&lt;br /&gt;
	HSYNC  : out STD_LOGIC;&lt;br /&gt;
	VSYNC  : out STD_LOGIC;&lt;br /&gt;
	DE     : out STD_LOGIC;&lt;br /&gt;
	CURSOR : out STD_LOGIC;&lt;br /&gt;
	LPSTBn : in STD_LOGIC;&lt;br /&gt;
	E      : in STD_LOGIC;&lt;br /&gt;
	RS     : in STD_LOGIC;&lt;br /&gt;
	CSn    : in STD_LOGIC;&lt;br /&gt;
	RW     : in STD_LOGIC;&lt;br /&gt;
	D      : inout STD_LOGIC_VECTOR (DB_WIDTH-1 downto 0);&lt;br /&gt;
	RESETn : in STD_LOGIC;&lt;br /&gt;
	CLK    : in STD_LOGIC;&lt;br /&gt;
	-- not standard&lt;br /&gt;
	REG_INIT: in STD_LOGIC;&lt;br /&gt;
	--&lt;br /&gt;
	Hend: inout STD_LOGIC;&lt;br /&gt;
	HS: inout STD_LOGIC;&lt;br /&gt;
	CHROW_CLK: inout STD_LOGIC;&lt;br /&gt;
	Vend: inout STD_LOGIC;&lt;br /&gt;
	SLadj: inout STD_LOGIC;&lt;br /&gt;
	H: inout STD_LOGIC;&lt;br /&gt;
	V: inout STD_LOGIC;&lt;br /&gt;
	CURSOR_ACTIVE: inout STD_LOGIC;&lt;br /&gt;
	VERT_RST: inout STD_LOGIC&lt;br /&gt;
    );&lt;br /&gt;
end crtc6845;&lt;br /&gt;
&lt;br /&gt;
architecture crtc6845_behav of crtc6845 is&lt;br /&gt;
&lt;br /&gt;
-- components&lt;br /&gt;
component cursor_ctrl&lt;br /&gt;
    port (&lt;br /&gt;
    	RESETn : in STD_LOGIC;&lt;br /&gt;
	CLK    : in STD_LOGIC;&lt;br /&gt;
	RA     : in STD_LOGIC_VECTOR (RA_WIDTH-1 downto 0);&lt;br /&gt;
	CURSOR : out STD_LOGIC;&lt;br /&gt;
	ACTIVE : in STD_LOGIC;&lt;br /&gt;
        CURST  : in STD_LOGIC_VECTOR (6 downto 0);&lt;br /&gt;
        CUREND : in STD_LOGIC_VECTOR (4 downto 0)&lt;br /&gt;
    );&lt;br /&gt;
end component;&lt;br /&gt;
&lt;br /&gt;
-- 6845 registers R0-R17&lt;br /&gt;
signal REG_HT		: STD_LOGIC_VECTOR (7 downto 0);&lt;br /&gt;
signal REG_HD		: STD_LOGIC_VECTOR (7 downto 0);&lt;br /&gt;
signal REG_HSP		: STD_LOGIC_VECTOR (7 downto 0);&lt;br /&gt;
signal REG_HSW		: STD_LOGIC_VECTOR (3 downto 0);&lt;br /&gt;
signal REG_VT		: STD_LOGIC_VECTOR (6 downto 0);&lt;br /&gt;
signal REG_ADJ		: STD_LOGIC_VECTOR (4 downto 0);&lt;br /&gt;
signal REG_VD		: STD_LOGIC_VECTOR (6 downto 0);&lt;br /&gt;
signal REG_VSP		: STD_LOGIC_VECTOR (6 downto 0);&lt;br /&gt;
signal REG_IM		: STD_LOGIC_VECTOR (1 downto 0);&lt;br /&gt;
signal REG_SL		: STD_LOGIC_VECTOR (4 downto 0);&lt;br /&gt;
signal REG_CURST	: STD_LOGIC_VECTOR (6 downto 0);&lt;br /&gt;
signal REG_CUREND	: STD_LOGIC_VECTOR (4 downto 0);&lt;br /&gt;
signal REG_SA_H		: STD_LOGIC_VECTOR (5 downto 0);&lt;br /&gt;
signal REG_SA_L		: STD_LOGIC_VECTOR (7 downto 0);&lt;br /&gt;
signal REG_CUR_H	: STD_LOGIC_VECTOR (5 downto 0);&lt;br /&gt;
signal REG_CUR_L	: STD_LOGIC_VECTOR (7 downto 0);&lt;br /&gt;
signal REG_LP_H		: STD_LOGIC_VECTOR (5 downto 0);&lt;br /&gt;
signal REG_LP_L		: STD_LOGIC_VECTOR (7 downto 0);&lt;br /&gt;
&lt;br /&gt;
-- Counters&lt;br /&gt;
signal CTR_HORIZ	: UNSIGNED (7 downto 0);&lt;br /&gt;
signal CTR_HSW		: UNSIGNED (3 downto 0);&lt;br /&gt;
signal CTR_SL		: UNSIGNED (4 downto 0);&lt;br /&gt;
signal CTR_VERT		: UNSIGNED (6 downto 0);&lt;br /&gt;
signal CTR_VSW		: UNSIGNED (4 downto 0);&lt;br /&gt;
signal CTR_LAG		: UNSIGNED (13 downto 0);&lt;br /&gt;
&lt;br /&gt;
-- I/O address register&lt;br /&gt;
signal REGIO_AR		: STD_LOGIC_VECTOR (AR_WIDTH-1 downto 0);&lt;br /&gt;
&lt;br /&gt;
-- Interconnect signals (as in MC6845 datasheet)&lt;br /&gt;
--pragma translate_off&lt;br /&gt;
signal	Hend: STD_LOGIC;&lt;br /&gt;
signal	HS: STD_LOGIC;&lt;br /&gt;
signal	CHROW_CLK: STD_LOGIC;&lt;br /&gt;
signal	Vend: STD_LOGIC;&lt;br /&gt;
signal	SLadj: STD_LOGIC;&lt;br /&gt;
signal	H: STD_LOGIC;&lt;br /&gt;
signal	V: STD_LOGIC;&lt;br /&gt;
signal	CURSOR_ACTIVE: STD_LOGIC;&lt;br /&gt;
signal	VERT_RST: STD_LOGIC;&lt;br /&gt;
--pragma translate_on&lt;br /&gt;
&lt;br /&gt;
-- Shared Variables&lt;br /&gt;
signal Hdisp: STD_LOGIC;&lt;br /&gt;
signal Vdisp: STD_LOGIC;&lt;br /&gt;
shared variable ROWaddr: UNSIGNED (13 downto 0);&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
ext_read:&lt;br /&gt;
process(E)&lt;br /&gt;
begin&lt;br /&gt;
	if rising_edge(E) then&lt;br /&gt;
		if CSn = '0' and RW = '1' and RS = '1' then&lt;br /&gt;
			case REGIO_AR is&lt;br /&gt;
				when INDEX_CUR_H =&amp;gt;&lt;br /&gt;
					D(5 downto 0) &amp;lt;= REG_CUR_H;&lt;br /&gt;
					D(7 downto 6) &amp;lt;= &amp;quot;00&amp;quot;;&lt;br /&gt;
				when INDEX_CUR_L =&amp;gt;&lt;br /&gt;
					D &amp;lt;= REG_CUR_L;&lt;br /&gt;
				when INDEX_LP_H =&amp;gt;&lt;br /&gt;
					D(5 downto 0) &amp;lt;= REG_LP_H;&lt;br /&gt;
					D(7 downto 6) &amp;lt;= &amp;quot;00&amp;quot;;&lt;br /&gt;
				when INDEX_LP_L =&amp;gt;&lt;br /&gt;
					D &amp;lt;= REG_LP_L;&lt;br /&gt;
				when others =&amp;gt;&lt;br /&gt;
					D &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
			end case;&lt;br /&gt;
		else&lt;br /&gt;
			D &amp;lt;= (others =&amp;gt; 'Z');&lt;br /&gt;
		end if;&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
ext_write:&lt;br /&gt;
process(E,REG_INIT)&lt;br /&gt;
begin&lt;br /&gt;
	if falling_edge(E) then&lt;br /&gt;
	if REG_INIT = '1' then&lt;br /&gt;
		REGIO_AR &amp;lt;= b&amp;quot;0&amp;quot; &amp;amp; x&amp;quot;0&amp;quot;;&lt;br /&gt;
		REG_HT &amp;lt;= x&amp;quot;65&amp;quot;;&lt;br /&gt;
		REG_HD &amp;lt;= x&amp;quot;50&amp;quot;;&lt;br /&gt;
		REG_HSP &amp;lt;= x&amp;quot;56&amp;quot;;&lt;br /&gt;
		REG_HSW &amp;lt;= x&amp;quot;9&amp;quot;;&lt;br /&gt;
		REG_SL &amp;lt;= '0' &amp;amp; x&amp;quot;b&amp;quot;;&lt;br /&gt;
		REG_VT &amp;lt;= b&amp;quot;001&amp;quot; &amp;amp; x&amp;quot;8&amp;quot;; --18&lt;br /&gt;
		REG_ADJ &amp;lt;= b&amp;quot;0&amp;quot; &amp;amp; x&amp;quot;a&amp;quot;;&lt;br /&gt;
		REG_VD &amp;lt;= b&amp;quot;001&amp;quot; &amp;amp; x&amp;quot;8&amp;quot;; --18&lt;br /&gt;
		REG_VSP &amp;lt;= b&amp;quot;001&amp;quot; &amp;amp; x&amp;quot;8&amp;quot;;--18&lt;br /&gt;
		REG_CURST &amp;lt;= b&amp;quot;000&amp;quot; &amp;amp; x&amp;quot;0&amp;quot;;&lt;br /&gt;
		REG_CUREND &amp;lt;= b&amp;quot;0&amp;quot; &amp;amp; x&amp;quot;B&amp;quot;;&lt;br /&gt;
		REG_SA_H &amp;lt;= b&amp;quot;00&amp;quot; &amp;amp; x&amp;quot;0&amp;quot;;&lt;br /&gt;
		REG_SA_L &amp;lt;= x&amp;quot;80&amp;quot;;&lt;br /&gt;
		REG_CUR_H &amp;lt;= b&amp;quot;00&amp;quot; &amp;amp; x&amp;quot;0&amp;quot;;&lt;br /&gt;
		REG_CUR_L &amp;lt;= x&amp;quot;80&amp;quot;;&lt;br /&gt;
	end if;&lt;br /&gt;
	end if;&lt;br /&gt;
--pragma translate_off&lt;br /&gt;
		if CSn = '0' and RW = '0' then&lt;br /&gt;
			if RS = '0' then&lt;br /&gt;
				REGIO_AR &amp;lt;= D (AR_WIDTH-1 downto 0);&lt;br /&gt;
			else&lt;br /&gt;
				case REGIO_AR is&lt;br /&gt;
					when INDEX_HT =&amp;gt;&lt;br /&gt;
						REG_HT &amp;lt;= D;&lt;br /&gt;
					when INDEX_HD =&amp;gt;&lt;br /&gt;
						REG_HD &amp;lt;= D;&lt;br /&gt;
					when INDEX_HSP =&amp;gt;&lt;br /&gt;
						REG_HSP &amp;lt;= D;&lt;br /&gt;
					when INDEX_HSW =&amp;gt;&lt;br /&gt;
						REG_HSW &amp;lt;= D(3 downto 0);&lt;br /&gt;
					when INDEX_SL =&amp;gt;&lt;br /&gt;
						REG_SL &amp;lt;= D(4 downto 0);&lt;br /&gt;
					when INDEX_VT =&amp;gt;&lt;br /&gt;
						REG_VT &amp;lt;= D(6 downto 0);&lt;br /&gt;
					when INDEX_ADJ =&amp;gt;&lt;br /&gt;
						REG_ADJ &amp;lt;= D(4 downto 0);&lt;br /&gt;
					when INDEX_VD =&amp;gt;&lt;br /&gt;
						REG_VD &amp;lt;= D(6 downto 0);&lt;br /&gt;
					when INDEX_VSP =&amp;gt;&lt;br /&gt;
						REG_VSP &amp;lt;= D(6 downto 0);&lt;br /&gt;
					when INDEX_CURST =&amp;gt;&lt;br /&gt;
						REG_CURST &amp;lt;= D(6 downto 0);&lt;br /&gt;
					when INDEX_CUREND =&amp;gt;&lt;br /&gt;
						REG_CUREND &amp;lt;= D(4 downto 0);&lt;br /&gt;
					when INDEX_SA_H =&amp;gt;&lt;br /&gt;
						REG_SA_H &amp;lt;= D(5 downto 0);&lt;br /&gt;
					when INDEX_SA_L =&amp;gt;&lt;br /&gt;
						REG_SA_L &amp;lt;= D;&lt;br /&gt;
					when INDEX_CUR_H =&amp;gt;&lt;br /&gt;
						REG_CUR_H &amp;lt;= D(5 downto 0);&lt;br /&gt;
					when INDEX_CUR_L =&amp;gt;&lt;br /&gt;
						REG_CUR_L &amp;lt;= D;&lt;br /&gt;
					when others =&amp;gt;&lt;br /&gt;
						null;&lt;br /&gt;
				end case;&lt;br /&gt;
			end if;&lt;br /&gt;
		end if;&lt;br /&gt;
	end if;&lt;br /&gt;
--pragma translate_on&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
-- Horizontal Sync                        --&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
&lt;br /&gt;
H_p:&lt;br /&gt;
process(CLK, RESETn)&lt;br /&gt;
begin&lt;br /&gt;
	if RESETn = '0' then&lt;br /&gt;
		CTR_HORIZ &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
	elsif rising_edge(CLK) then&lt;br /&gt;
		if MAKE_BINARY(CTR_HORIZ) = REG_HT then&lt;br /&gt;
			H &amp;lt;= '1';&lt;br /&gt;
			CTR_HORIZ &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
		else&lt;br /&gt;
			H &amp;lt;= '0';&lt;br /&gt;
			CTR_HORIZ &amp;lt;= CTR_HORIZ + 1;&lt;br /&gt;
		end if;&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
Hend_p:&lt;br /&gt;
process(CTR_HORIZ, REG_HD)&lt;br /&gt;
begin&lt;br /&gt;
	if MAKE_BINARY(CTR_HORIZ) = REG_HD then&lt;br /&gt;
		Hend &amp;lt;= '1';&lt;br /&gt;
	else&lt;br /&gt;
		Hend &amp;lt;= '0';&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
CTR_HSW_p:&lt;br /&gt;
process(CLK, RESETn)&lt;br /&gt;
begin&lt;br /&gt;
	if RESETn = '0' then&lt;br /&gt;
		CTR_HSW &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
	elsif rising_edge(CLK) then&lt;br /&gt;
		if HS = '1' then&lt;br /&gt;
			CTR_HSW &amp;lt;= CTR_HSW + 1;&lt;br /&gt;
		else&lt;br /&gt;
			CTR_HSW &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
		end if;&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
HS_p:&lt;br /&gt;
process(CTR_HORIZ, CTR_HSW, REG_HSP, REG_HSW, HS)&lt;br /&gt;
begin&lt;br /&gt;
	if MAKE_BINARY(CTR_HORIZ) = REG_HSP then&lt;br /&gt;
		HS &amp;lt;= '1';&lt;br /&gt;
	elsif MAKE_BINARY(CTR_HSW) = REG_HSW then&lt;br /&gt;
		HS &amp;lt;= '0';&lt;br /&gt;
	else&lt;br /&gt;
		HS &amp;lt;= HS;&lt;br /&gt;
	end if;&lt;br /&gt;
	HSYNC &amp;lt;= HS;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
-- Display Enable                         --&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
&lt;br /&gt;
DE_p:&lt;br /&gt;
process(H, Hend, V, Vend, Hdisp, Vdisp)&lt;br /&gt;
begin&lt;br /&gt;
	if H = '1' and Hend = '0' then&lt;br /&gt;
		Hdisp &amp;lt;= '1';&lt;br /&gt;
	elsif H = '0' and Hend = '1' then&lt;br /&gt;
		Hdisp &amp;lt;= '0';&lt;br /&gt;
	else&lt;br /&gt;
		Hdisp &amp;lt;= Hdisp;&lt;br /&gt;
	end if;&lt;br /&gt;
	if V = '1' and Vend = '0' then&lt;br /&gt;
		Vdisp &amp;lt;= '1';&lt;br /&gt;
	elsif V = '0' and Vend = '1' then&lt;br /&gt;
		Vdisp &amp;lt;= '0';&lt;br /&gt;
	else&lt;br /&gt;
		Vdisp &amp;lt;= Vdisp;&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
DE &amp;lt;= Hdisp and Vdisp;&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
-- Scan Line Counter                      --&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
&lt;br /&gt;
CTR_SL_p:&lt;br /&gt;
process(H, RESETn)&lt;br /&gt;
begin&lt;br /&gt;
	if RESETn = '0' then&lt;br /&gt;
		CTR_SL &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
	elsif rising_edge(H) then&lt;br /&gt;
		if MAKE_BINARY(CTR_SL) = REG_SL then&lt;br /&gt;
			CHROW_CLK &amp;lt;= '1';&lt;br /&gt;
			CTR_SL &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
		else&lt;br /&gt;
			CHROW_CLK &amp;lt;= '0';&lt;br /&gt;
			CTR_SL &amp;lt;= CTR_SL + 1;&lt;br /&gt;
		end if;&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
RA &amp;lt;= MAKE_BINARY(CTR_SL);&lt;br /&gt;
&lt;br /&gt;
SLadj_p:&lt;br /&gt;
process(CTR_SL, REG_ADJ)&lt;br /&gt;
begin&lt;br /&gt;
	if MAKE_BINARY(CTR_SL) = REG_ADJ then&lt;br /&gt;
		SLadj &amp;lt;= '1';&lt;br /&gt;
	else&lt;br /&gt;
		SLadj &amp;lt;= '0';&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
-- Vertical Sync (Character Row CTR)      --&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
&lt;br /&gt;
V_p:&lt;br /&gt;
process(CHROW_CLK, RESETn)&lt;br /&gt;
begin&lt;br /&gt;
	if RESETn = '0' then&lt;br /&gt;
		CTR_VERT &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
	elsif rising_edge(CHROW_CLK) then&lt;br /&gt;
		if MAKE_BINARY(CTR_VERT) = REG_VT then&lt;br /&gt;
			V &amp;lt;= '1';&lt;br /&gt;
--			if SLadj = '1' then&lt;br /&gt;
				VERT_RST &amp;lt;= '1';&lt;br /&gt;
				CTR_VERT &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
--			end if;&lt;br /&gt;
		else&lt;br /&gt;
			VERT_RST &amp;lt;= '0';&lt;br /&gt;
			V &amp;lt;= '0';&lt;br /&gt;
			CTR_VERT &amp;lt;= CTR_VERT + 1;&lt;br /&gt;
		end if;&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
Vend_p:&lt;br /&gt;
process(CTR_VERT, REG_VD)&lt;br /&gt;
begin&lt;br /&gt;
	if MAKE_BINARY(CTR_VERT) = REG_VD then&lt;br /&gt;
		Vend &amp;lt;= '1';&lt;br /&gt;
	else&lt;br /&gt;
		Vend &amp;lt;= '0';&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
CTR_VSW_p:&lt;br /&gt;
process(H, RESETn, CTR_VERT, REG_VSP, CTR_VSW)&lt;br /&gt;
begin&lt;br /&gt;
	if RESETn = '0' then&lt;br /&gt;
		CTR_VSW &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
	elsif rising_edge(H) then&lt;br /&gt;
		if MAKE_BINARY(CTR_VERT) = REG_VSP then&lt;br /&gt;
			CTR_VSW &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
		end if;&lt;br /&gt;
		if CTR_VSW /= 16 then&lt;br /&gt;
			CTR_VSW &amp;lt;= CTR_VSW + 1;&lt;br /&gt;
			VSYNC &amp;lt;= '1';&lt;br /&gt;
		else&lt;br /&gt;
			VSYNC &amp;lt;= '0';&lt;br /&gt;
		end if;&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
-- Linear Address Generator               --&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
&lt;br /&gt;
ROWaddr_p:&lt;br /&gt;
process(RESETn, CHROW_CLK, VERT_RST, REG_SA_H, REG_SA_L)&lt;br /&gt;
begin&lt;br /&gt;
	if RESETn = '0' then&lt;br /&gt;
		ROWaddr := MAKE_UNSIGNED(REG_SA_H &amp;amp; REG_SA_L);&lt;br /&gt;
	elsif rising_edge(CHROW_CLK) then&lt;br /&gt;
		ROWaddr := ROWaddr + MAKE_UNSIGNED(REG_HD);&lt;br /&gt;
		if VERT_RST = '1' then&lt;br /&gt;
			ROWaddr := MAKE_UNSIGNED(REG_SA_H &amp;amp; REG_SA_L);&lt;br /&gt;
		end if;&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
LAG_p:&lt;br /&gt;
process(CLK, RESETn, H, REG_SA_H, REG_SA_L)&lt;br /&gt;
begin&lt;br /&gt;
	if RESETn = '0' then&lt;br /&gt;
		CTR_LAG &amp;lt;= MAKE_UNSIGNED(REG_SA_H &amp;amp; REG_SA_L);&lt;br /&gt;
	elsif rising_edge(CLK) then&lt;br /&gt;
		if H = '1' then&lt;br /&gt;
			CTR_LAG &amp;lt;= ROWaddr;&lt;br /&gt;
		end if;&lt;br /&gt;
		CTR_LAG &amp;lt;= CTR_LAG + 1;&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
MA &amp;lt;= MAKE_BINARY(CTR_LAG);&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
-- Light Pen Capture                      --&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
LP_p:&lt;br /&gt;
process(CLK, LPSTBn)&lt;br /&gt;
begin&lt;br /&gt;
	if rising_edge(CLK) then&lt;br /&gt;
		if LPSTBn = '0' then&lt;br /&gt;
			REG_LP_H &amp;lt;= MAKE_BINARY(CTR_LAG(13 downto 8));&lt;br /&gt;
			REG_LP_L &amp;lt;= MAKE_BINARY(CTR_LAG(7 downto 0));&lt;br /&gt;
		end if;&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
-- Cursor Control Unit Instantiation      --&lt;br /&gt;
--------------------------------------------&lt;br /&gt;
CURSOR_p:&lt;br /&gt;
process(CTR_LAG, REG_CUR_H, REG_CUR_L)&lt;br /&gt;
begin&lt;br /&gt;
	if CTR_LAG = MAKE_UNSIGNED(REG_CUR_H &amp;amp; REG_CUR_L) then&lt;br /&gt;
		CURSOR_ACTIVE &amp;lt;= '1';&lt;br /&gt;
	else&lt;br /&gt;
		CURSOR_ACTIVE &amp;lt;= '0';&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
cursor_ctrl_inst: cursor_ctrl&lt;br /&gt;
    port map (&lt;br /&gt;
    	RESETn =&amp;gt; RESETn,&lt;br /&gt;
    	CLK =&amp;gt; V,&lt;br /&gt;
	RA =&amp;gt; MAKE_BINARY(CTR_SL),&lt;br /&gt;
	CURSOR =&amp;gt; CURSOR,&lt;br /&gt;
	ACTIVE =&amp;gt; CURSOR_ACTIVE,&lt;br /&gt;
        CURST =&amp;gt; REG_CURST,&lt;br /&gt;
        CUREND =&amp;gt; REG_CUREND&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
end crtc6845_behav;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cursor.vhd'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--===========================================================================--&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  S Y N T H E S I Z A B L E    CRTC6845   C O R E                          --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  www.opencores.org - January 2000                                         --&lt;br /&gt;
--  This IP core adheres to the GNU public license.                          --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  VHDL model of MC6845 compatible CRTC                                     --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  This model doesn't implement interlace mode. Everything else is          --&lt;br /&gt;
--  (probably) according to original MC6845 data sheet (except VTOTADJ).     --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  Implementation in Xilinx Virtex XCV50-6 runs at 50 MHz (character clock).--&lt;br /&gt;
--  With external pixel	generator this CRTC could handle 450MHz pixel rate   --&lt;br /&gt;
--  (see MC6845 datasheet for typical application).	                     --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  Author: Damjan Lampret, lampret@opencores.org                            --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--  TO DO:                                                                   --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - fix REG_INIT and remove non standard signals at topl level entity.    --&lt;br /&gt;
--     Allow fixed registers values (now set with REG_INIT). Anyway cleanup  --&lt;br /&gt;
--     required.                                                             --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - split design in four units (horizontal sync, vertical sync, bus       --&lt;br /&gt;
--     interface and the rest)                                               --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - synthesis with Synplify pending (there are some problems with         --&lt;br /&gt;
--     UNSIGNED and BIT_LOGIC_VECTOR types in some units !)                  --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - testbench                                                             --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - interlace mode support, extend VSYNC for V.Total Adjust value (R5)    --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--   - verification in a real application                                    --&lt;br /&gt;
--                                                                           --&lt;br /&gt;
--===========================================================================--&lt;br /&gt;
&lt;br /&gt;
library IEEE;&lt;br /&gt;
use IEEE.std_logic_1164.all;&lt;br /&gt;
use IEEE.std_logic_arith.all;&lt;br /&gt;
use work.config.all;&lt;br /&gt;
&lt;br /&gt;
entity cursor_ctrl is&lt;br /&gt;
    port (&lt;br /&gt;
    	RESETn : in STD_LOGIC;&lt;br /&gt;
    	CLK    : in STD_LOGIC;&lt;br /&gt;
	RA     : in STD_LOGIC_VECTOR (RA_WIDTH-1 downto 0);&lt;br /&gt;
	CURSOR : out STD_LOGIC;&lt;br /&gt;
	ACTIVE : in STD_LOGIC;&lt;br /&gt;
        CURST  : in STD_LOGIC_VECTOR (6 downto 0);&lt;br /&gt;
        CUREND : in STD_LOGIC_VECTOR (4 downto 0)&lt;br /&gt;
    );&lt;br /&gt;
end cursor_ctrl;&lt;br /&gt;
&lt;br /&gt;
architecture cursor_ctrl_behav of cursor_ctrl is&lt;br /&gt;
&lt;br /&gt;
signal CTR_BLINK : UNSIGNED (4 downto 0);&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
blink_ctr_p:&lt;br /&gt;
process (CLK, RESETn)&lt;br /&gt;
begin&lt;br /&gt;
	if RESETn = '0' then&lt;br /&gt;
		CTR_BLINK &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
	elsif rising_edge(CLK) then&lt;br /&gt;
		CTR_BLINK &amp;lt;= CTR_BLINK + 1;&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
cursor_p:&lt;br /&gt;
process (ACTIVE, CURST, CUREND, RA, CTR_BLINK)&lt;br /&gt;
begin&lt;br /&gt;
	if RA &amp;gt;= CURST(4 downto 0) and RA &amp;lt;= CUREND and ACTIVE = '1' then&lt;br /&gt;
		case CURST(6 downto 5) is&lt;br /&gt;
			when &amp;quot;00&amp;quot; =&amp;gt;&lt;br /&gt;
				CURSOR &amp;lt;= '1';&lt;br /&gt;
			when &amp;quot;10&amp;quot; =&amp;gt;&lt;br /&gt;
				CURSOR &amp;lt;= CTR_BLINK(3);&lt;br /&gt;
			when &amp;quot;11&amp;quot; =&amp;gt;&lt;br /&gt;
				CURSOR &amp;lt;= CTR_BLINK(4);&lt;br /&gt;
			when others =&amp;gt;&lt;br /&gt;
				CURSOR &amp;lt;= '0';&lt;br /&gt;
		end case;		&lt;br /&gt;
	else&lt;br /&gt;
		CURSOR &amp;lt;= '0';&lt;br /&gt;
	end if;&lt;br /&gt;
end process;&lt;br /&gt;
&lt;br /&gt;
end cursor_ctrl_behav;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Octoate</name></author>	</entry>

	</feed>