基于Verilog的FPGA步进电机控制Word文档格式.docx
《基于Verilog的FPGA步进电机控制Word文档格式.docx》由会员分享,可在线阅读,更多相关《基于Verilog的FPGA步进电机控制Word文档格式.docx(17页珍藏版)》请在冰豆网上搜索。
![基于Verilog的FPGA步进电机控制Word文档格式.docx](https://file1.bdocx.com/fileroot1/2022-11/27/0adc151f-6118-4cd9-a4db-aa0969bf053f/0adc151f-6118-4cd9-a4db-aa0969bf053f1.gif)
//减速
parameterdns=2'
b10;
//停止
parameterstop=2'
b11;
//最大速度
parameteraver=4'
b1000;
//电机运行方向,复位,时钟输入
inputdirect,rst,clk;
//控制电机信号输出
output[3:
0]out;
reg[3:
//加速速度转换计数
0]count1;
//减速速度转换计数
0]count2;
//加速速度数字代表
0]countup;
//减速速度数字代表
0]countdn;
//特定速度运行时间计数
reg[6:
0]count;
//特定速度运行时间到标志
parametercountmax=7'
b1111111;
always@(posedgeclkornegedgerst)
if(!
rst)
begin
countup<
=4'
b1111;
count1<
count2<
countdn<
count<
=7'
b0;
end
elseif((speed==ups)||(speed==dns))
=count+1;
if(speed==ups)
if(count1==0)count1<
=countup;
if(count1!
=0)count1<
=count1-1;
if((countup>
b1001)&
&
(count==countmax))
begin
=countup-1;
count1<
count=7'
end
if((countup==aver)&
=aver;
countdn<
count<
elseif(speed==dns)
count1=4'
if(count2==0)count2<
=countdn;
if(count2!
=0)count2<
=count2-1;
if((countdn<
b1110)&
=countdn+1;
count2<
count<
if((countdn==4'
b1111)&
elseif(speed==stop)
countup<
always@(count1orcount2orrst)
rst)out<
b1001;
elseif((count1==0)||(count2==0))
if(speed==stop)
out<
=out;
if(direct==1)
out<
={out[2:
0],out[3]};
elseif(direct==0)
={out[0],out[3:
1]};
endmodule
(英文版)
Tworegulationspromulgatedforimplementationisinthepartyinpowerforalongtimeandtheruleoflawconditions,theimplementationofcomprehensivestrictlystrategicplan,implementationinaccordancewiththerulesanddisciplinetomanagetheparty,strengtheninner-partysupervisionofmajorinitiatives.Thetworegulationssupportingeachother,the<
code>
adheretoapositiveadvocate,focusingonmoralityisofPartymembersandPartyleadingcadrescansee,enoughtogetahighstandard;
<
rule>
aroundthepartydiscipline,disciplinaryrulerrequirements,listedas"
negativelist,focusingonverticalgauge,drawthepartyorganizationsandPartymembersdonottouchthe"
bottomline"
.Here,themainfromfoursquarefacetwopartyrulesofinterpretation:
thefirstpartintroducestwopartyRevisedregulationsthenecessityandtherevisionprocess;
thesecondpartistheinterpretationofthetwofundamentalprinciplesoftherevisionoflawsandregulationsintheparty;
thethirdpartintroducestwopartyregulationsmodifiedthemainchangesandneedstograspseveralkeyproblems;
thefourthpartonhowtograsptheimplementationofthetworegulationsoftheparty.<
and<
Regulations>
revisedthenecessityandrevisedhistoryoftheCPCCentralCommitteetheamendmenttotheChineseCommunistPartymembersandleadingcadreshonestpoliticsseveralguidelines>
ChineseCommunistPartydisciplineandPunishmentRegulations>
column1by2015tostrengthenpartylawsandregulationsfocus.TwopartyregulationsrevisionworklastedaYears,poolingthewisdomofthewholeparty,ideologicalconsensus,drawhistoricalexperience,respectforthewisdomofourpredecessors,whichreflectstheunityofinheritanceandinnovation;
followthecorrectdirection,graspthelimitedgoals,adheretotheparty'
sleadership,tosolvethemassesofthepeoplereflectafocusontheproblem.Thenewrevisionofthe<
reflectstheparty'
s18andtheeighthsessionofthethird,thespiritofthefourthplenarysession,reflectingtheexperienceofstudyingandimplementingtheGeneralSecretaryXiJinpingseriesofimportantspeech,reflectstheparty'
seighteenyearscomprehensivestrictlypractice.(a)revisedtworegulationsofthepartyneedof<
theICACguidelines>
in<
in1997LeadersasmembersoftheCommunistPartyofChinacleanpoliticscertaincriteria(Trial)>
basedonrevised,thepromulgationandimplementationofJanuary2010,tostrengthentheconstructionofthecontingentofleadingcadresplayanimportantrole.Butwiththepartytomanagethepartystrictlyadministeringthedeepening,hasnotbeenabletofullymeettheactualneeds.Contentistoocomplicated,"
eightprohibition,52arenotallowedto"
hardtoremember,andalsodifficulttoputintopractice;
thesecondisconciselypositiveadvocatedbythelackofprohibitedprovisionsexcessive,noautonomyrequirements;
thethirdisbannedtermsanddisciplinelaw,bothwiththepartydiscipline,disciplinaryregulationsrepeatandCriminallawandotherlawsandregulationsrepeat;
thefourthisto"
clean"
thethemeisnotprominent,notfortheexistingproblems,andisnarrow,onlyneedleofcounty-levelleadingcadresabove.<
isin1997<
ChineseCommunistPartydisciplinarycases(Trial)>
basedonrevision,inDecember2003thepromulgationandimplementation,tostrengthentheconstructionofthepartyplayveryimportantrole.Alongwiththedevelopmentofthesituation,whichmanyprovisionshavebeenunabletofullymeetthecomprehensivestrictlyadministeringthepracticeneeds.OneisJilaw,morethanhalfoftheprovisionsandcriminallawandothercountrieslawsandregulationsRepetition;
twoisthepoliticaldisciplineregulationsisnotprominent,notspecific,forviolationofthepartyconstitution,damagetheauthorityofPartyConstitutionofmisconductlacknecessaryandseriousresponsibilitytopursue;
thirdisthemaindisciplinefortheleadingcadres,doesnotcoverallPartymembers.Basedontheabovesituation,needto<
thecriterionofacleanandhonestadministration>
thetwoislikelytobemorerelevantregulationsfirstamendment.Byrevising,reallyputtheauthorityofPartydiscipline,theseriousnessinthepartytreeandcallupthemajorityofPartymembersandcadresofthepartyconstitutionofpartycompassespartyconsciousness.(II)twopartyregulationsrevisionprocesstheCentralCommitteeoftheCommunistPartyofChinaattachesgreatimportancetotworegulationsrevision.XiJinping,generalbooksrecordedintheFifthPlenarySessionoftheeighthsessionoftheCentralCommissionforDisciplineInspection,ontherevisedregulations<
>
madeclearinstructions.Accordingtothecentraldeployment,theCentralCommissionforDisciplineInspectionfrom2014undersixmonthsbeginstudytworegulationsrevision.TheStandingCommitteeoftheCentralCommissionforDisciplineInspection4reviewrevised.ComradeWangQishan14timesheldaspecialmeetingtostudytworegulationsrevision,amendmentclarifiesthedirection,majorissuesofprinciple,pathandtarget,respectivelyheldaforumwilllistentopartoftheprovince(area)secretaryofthePartycommittee,SecretaryoftheDisciplineInspectionCommission,partofthecentralministriesandstateorgansDepartment
Thefirstpartycommitteeismainlyresponsibleforpeople,viewsofexpertsandscholarsandgrassrootspartyorganizationsandPartymembers.ApprovedbytheCentralCommitteeoftheCommunistPartyofChina,on7September2015,thegeneralofficeoftheCentralCommitteeofthePartyissuedanoticetosolicittheprovinces(autonomousregions,municipalities)Party,thecentralministriesandcommissions,stateministriesandcommissionsoftheParty(party),theGeneralPoliticalDepartmentofthemilitary,every3peopleorganizationofPartyoftworegulationsrevisionopinion.CentralCommissionforDisciplineInspectionofextensivesolicitationofopinions,carefulstudy,attracting,formedarevisedsentreviewers.InOctober8andOctober12,CentralCommitteePoliticalBureauStandingCommitteeandthePoliticalBureauoftheCentralCommitteeAfterconsiderationofthetworegulationsreviseddraft.OnOctober18,theCentralCommitteeoftheCommunistPartyofChinaformallyissuedtworegulations.Cansay,twolawsamendmentconcentratedthewisdomofthewholeparty,embodiestheparty.Second,<
revisionofthebasicprinciplesoftwopartyregulationsrevisionworkandimplementtheparty'
seighteen,teneightplenary,thespiritoftheFourthPlenarySessionoftheEleventhCentralCommitteeandGeneralSecretaryXiJinpingimportantinstructionsontherevised<
lowpoliticalcriterion>
highlightingtherulingpartycharacteristics,seriousdiscipline,thedisciplinequiteinfrontofthelaw,basedonthecurrent,along-term,advanceasawhole,withBuXiudingindependent<
.Mainprincipleis:
first,adheretothepartyconstitutiontofollow.Theconstitutionaboutdisciplineandself-disciplinerequiredspecific,awakenthepartyconstitutionofpartycompassespartyconsciousness,maintainingtheauthorityoftheconstitution.GeneralSecretaryXiJinpingpointedoutthat"
norules,nosideround.Partyconstitutionisthefundamentallaw,thepartymustfollowthegeneralrules.Inearly2015heldtheeighthsessionoftheCentralCommissionforDisciplineInspectionFifthPlenarySessionofthe16thCentralCommittee,XiJinpingagainpointedoutthatconstitutionisthepartymustfollowthegeneralrules,butalsothegeneralrules."
therevisionofthe<
isMethodinadheretotheregulationsestablishedforthepurposeofcombiningruleofvirtueistoad