LitchiCheng 发表于 2023-8-13 18:19

AG32VF407 AGRV2K Verilog编写控制双路gpio输出不同频率方波

<div class='showpostmsg'><article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;3060-1621846615933&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;p5PQ-1621846617594&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;根据原理图,选择两个pin脚作为输出&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;V8qd-1691920946399&quot;,&quot;name&quot;:&quot;image&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;url&quot;:&quot;https://note.youdao.com/yws/res/4/WEBRESOURCEa2810b703e310939f63d4bf31334bde4&quot;,&quot;width&quot;:410,&quot;height&quot;:325},&quot;nodes&quot;:[],&quot;state&quot;:{&quot;loading&quot;:false,&quot;renderSource&quot;:&quot;https://note.youdao.com/yws/res/4/WEBRESOURCEa2810b703e310939f63d4bf31334bde4&quot;,&quot;initialSize&quot;:{&quot;width&quot;:410,&quot;height&quot;:325}}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;coNk-1691920946405&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;7e3v-1691920946404&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;修改VE文件,clk选择PIN_OSC,使用内部晶振8Mhz,gpio使用PIN_51和52,pinout是数组&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;JmRS-1691920931919&quot;,&quot;name&quot;:&quot;image&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;url&quot;:&quot;https://note.youdao.com/yws/res/b/WEBRESOURCE031c581f0ac2bd3f4d1d2e59bc1e7aab&quot;,&quot;width&quot;:634,&quot;height&quot;:386},&quot;nodes&quot;:[],&quot;state&quot;:{&quot;loading&quot;:false,&quot;renderSource&quot;:&quot;https://note.youdao.com/yws/res/b/WEBRESOURCE031c581f0ac2bd3f4d1d2e59bc1e7aab&quot;,&quot;initialSize&quot;:{&quot;width&quot;:634,&quot;height&quot;:386}}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;4hXf-1691920931935&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;BjFo-1691920931933&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;添加pll,修改pll,输入频率8M&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;VMpT-1691920995293&quot;,&quot;name&quot;:&quot;image&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;url&quot;:&quot;https://note.youdao.com/yws/res/c/WEBRESOURCE2420617429d3ba9adcae54df9b3281cc&quot;,&quot;width&quot;:986,&quot;height&quot;:881},&quot;nodes&quot;:[],&quot;state&quot;:{&quot;loading&quot;:false,&quot;renderSource&quot;:&quot;https://note.youdao.com/yws/res/c/WEBRESOURCE2420617429d3ba9adcae54df9b3281cc&quot;,&quot;initialSize&quot;:{&quot;width&quot;:986,&quot;height&quot;:881}}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;AUxD-1691921008092&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;WvHw-1691921008093&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;输出c0,32Mhz&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;tIn5-1691921262876&quot;,&quot;name&quot;:&quot;image&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;url&quot;:&quot;https://note.youdao.com/yws/res/a/WEBRESOURCE71954a0d213a318b2ece65ea637124fa&quot;,&quot;width&quot;:880,&quot;height&quot;:400},&quot;nodes&quot;:[],&quot;state&quot;:{&quot;loading&quot;:false,&quot;renderSource&quot;:&quot;https://note.youdao.com/yws/res/a/WEBRESOURCE71954a0d213a318b2ece65ea637124fa&quot;,&quot;initialSize&quot;:{&quot;width&quot;:880,&quot;height&quot;:400}}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;PUK4-1691921262880&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;hnJ5-1691921262878&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;输出c1,8Mhz&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;yxTz-1691921270611&quot;,&quot;name&quot;:&quot;image&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;url&quot;:&quot;https://note.youdao.com/yws/res/3/WEBRESOURCEfa703e188e515b97339c219bc47b6e53&quot;,&quot;width&quot;:875,&quot;height&quot;:428},&quot;nodes&quot;:[],&quot;state&quot;:{&quot;loading&quot;:false,&quot;renderSource&quot;:&quot;https://note.youdao.com/yws/res/3/WEBRESOURCEfa703e188e515b97339c219bc47b6e53&quot;,&quot;initialSize&quot;:{&quot;width&quot;:875,&quot;height&quot;:428}}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Bcve-1691921270615&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;iKPk-1691921270613&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;增加verilog逻辑代码,两个always循环,按照c0和c1翻转pin_51和pin_52&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;IbBT-1691921008091&quot;,&quot;name&quot;:&quot;code&quot;,&quot;data&quot;:{&quot;language&quot;:&quot;&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;wrap&quot;:false},&quot;nodes&quot;:[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;CYlC-1691921008090&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;ZV9L-1691921008088&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;`timescale 1ns / 1ns\r\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;j3vk-1691921008416&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;7jsE-1691921008415&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;module test(clk,pinout);\r\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;HSLv-1691921008420&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;TFvk-1691921008419&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;input\tclk;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;XUBL-1691921008426&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;lLDo-1691921008425&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;output  pinout;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;TPhD-1691921008428&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;Y6Cj-1691921008427&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;reg   pinout;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;tvTf-1691921035033&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;6IHI-1691921035032&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;F40v-1691921008434&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;3Qut-1691921008433&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;pll\tpll1_inst (\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;FmQJ-1691921008436&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;PV3B-1691921008435&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\t.areset ( 1'b0 ),\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;d5OD-1691921008438&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;mL6k-1691921008437&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\t.inclk0 ( clk ),\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;8fu9-1691921008440&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;kIym-1691921008439&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\t.c0 ( c0 ),\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;v5vO-1691921008442&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;EsFj-1691921008441&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\t.c1 ( c1 )\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;JcgO-1691921008444&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;HGyS-1691921008443&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\t);\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;5Bqx-1691921008446&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;vTMg-1691921008445&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;WLlI-1691921008448&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;D08k-1691921008447&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;wire c0;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;a7eT-1691921008450&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;AK3h-1691921008449&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;wire c1;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;a7sk-1691921038336&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;F5Fa-1691921038334&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;0JQd-1691921008454&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;rKz4-1691921008453&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;initial begin\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;xzCp-1691921008458&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;ktze-1691921008457&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;pinout = 3'b111;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;KtSi-1691921008460&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;JU23-1691921008459&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;end\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;z6cT-1691921008462&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;xLO6-1691921008461&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;0DFX-1691921008464&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;sXMV-1691921008463&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;always@(posedge c0) begin\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;SZBI-1691921008466&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;ucs2-1691921008465&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\tpinout = ~pinout;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;6Cbi-1691921008468&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;gm1K-1691921008467&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;end\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;06Y4-1691921008470&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;djX3-1691921008469&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;ceMD-1691921008472&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;w25v-1691921008471&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;always@(posedge c1) begin\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;mC8j-1691921008474&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;3eRe-1691921008473&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\tpinout = ~pinout;\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;vfam-1691921008476&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;xoof-1691921008475&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;end\r\t\t\r&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;phx3-1691921008481&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;WnO7-1691921008480&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;endmodule&quot;,&quot;marks&quot;:[]}]}]}],&quot;state&quot;:{&quot;language&quot;:&quot;sql&quot;}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;UNXD-1691921008094&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;SXe6-1691921008095&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;烧录,选择full chip erase before program&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;d92B-1691921087593&quot;,&quot;name&quot;:&quot;image&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;url&quot;:&quot;https://note.youdao.com/yws/res/b/WEBRESOURCE6d2581552cd546ddb1efb3d161d7da4b&quot;,&quot;width&quot;:731,&quot;height&quot;:638},&quot;nodes&quot;:[],&quot;state&quot;:{&quot;loading&quot;:false,&quot;renderSource&quot;:&quot;https://note.youdao.com/yws/res/b/WEBRESOURCE6d2581552cd546ddb1efb3d161d7da4b&quot;,&quot;initialSize&quot;:{&quot;width&quot;:731,&quot;height&quot;:638}}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Jeld-1691921087598&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;E17r-1691921087596&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;实测波形,这里12Mx2=24M,还有3.2Mx2=6.4M,和实际设置有差异,不确定是内部晶振问题还是配置问题,还需要和AGM进行技术咨询,总体的逻辑是符合预期,调整clock out的比例,波形输出也成比例。&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;g1h5-1691921103749&quot;,&quot;name&quot;:&quot;image&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;url&quot;:&quot;https://note.youdao.com/yws/res/d/WEBRESOURCE1be1a3a3aad4f55bcd8ac54eef892d6d&quot;,&quot;width&quot;:2560,&quot;height&quot;:1390},&quot;nodes&quot;:[],&quot;state&quot;:{&quot;loading&quot;:false,&quot;renderSource&quot;:&quot;https://note.youdao.com/yws/res/d/WEBRESOURCE1be1a3a3aad4f55bcd8ac54eef892d6d&quot;,&quot;initialSize&quot;:{&quot;width&quot;:2560,&quot;height&quot;:1390}}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;7bbi-1691921103753&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;aGkt-1691921103752&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p>根据原理图,选择两个pin脚作为输出</p>

<p> &nbsp;</p>

<p>修改VE文件,clk选择PIN_OSC,使用内部晶振8Mhz,gpio使用PIN_51和52,pinout是数组</p>

<p> &nbsp;</p>

<p>添加pll,修改pll,输入频率8M</p>

<p> &nbsp;</p>

<p>输出c0,32Mhz</p>

<p> &nbsp;</p>

<p>输出c1,8Mhz</p>

<p> &nbsp;</p>

<p>增加verilog逻辑代码,两个always循环,按照c0和c1翻转pin_51和pin_52</p>

<pre>
<code>`timescale 1ns / 1ns

module test(clk,pinout);

input    clk;
output pinout;
reg pinout;

pll    pll1_inst (
    .areset ( 1'b0 ),
    .inclk0 ( clk ),
    .c0 ( c0 ),
    .c1 ( c1 )
    );

wire c0;
wire c1;

initial begin
pinout = 3'b111;
end

always@(posedge c0) begin
    pinout = ~pinout;
end

always@(posedge c1) begin
    pinout = ~pinout;
end
      
endmodule</code></pre>

<p>烧录,选择full chip erase before program</p>

<p> &nbsp;</p>

<p>实测波形,这里12Mx2=24M,还有3.2Mx2=6.4M,和实际设置有差异,不确定是内部晶振问题还是配置问题,还需要和AGM进行技术咨询,总体的逻辑是符合预期,调整clock out的比例,波形输出也成比例。</p>

<p> &nbsp;</p>

<p>视频</p>

<p><iframe allowfullscreen="true" frameborder="0" height="450" src="//player.bilibili.com/player.html?bvid=1Ru4y1X7Vf&amp;page=1" style="background:#eee;margin-bottom:10px;" width="700"></iframe><br />
&nbsp;</p>
</article>
</div><script>                                        var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;"   style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
                                       
                                        if(parseInt(discuz_uid)==0){
                                                                                                (function($){
                                                        var postHeight = getTextHeight(400);
                                                        $(".showpostmsg").html($(".showpostmsg").html());
                                                        $(".showpostmsg").after(loginstr);
                                                        $(".showpostmsg").css({height:postHeight,overflow:"hidden"});
                                                })(jQuery);
                                        }                </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script>

lkh747566933 发表于 2023-8-13 19:01

外面还要加个电压跟随器吧,要不然用的时候会出问题。

火辣西米秀 发表于 2023-8-13 21:49

<p>从实测波形3.2Mx2=6.4M和实际设置有差异,有多少</p>

LitchiCheng 发表于 2023-8-14 20:50

lkh747566933 发表于 2023-8-13 19:01
外面还要加个电压跟随器吧,要不然用的时候会出问题。

<p>嗯,只是测试一下逻辑,时钟还有些问题,官方还没给解决</p>

LitchiCheng 发表于 2023-8-14 20:50

火辣西米秀 发表于 2023-8-13 21:49
从实测波形3.2Mx2=6.4M和实际设置有差异,有多少

<p>配置的8Mhz</p>
页: [1]
查看完整版本: AG32VF407 AGRV2K Verilog编写控制双路gpio输出不同频率方波