当前位置: 首页 > news >正文

山东建设厅网站株洲今日头条新闻

山东建设厅网站,株洲今日头条新闻,物业服务企业的品牌建设,seo外贸推广Verilog-2005支持一些简单的数学函数,其参数的数据类型只能是integer和real型。 Integer型数学函数 $clog2是一个以2为底的对数函数,其结果向上取整,返回值典型的格式: integer result; result $clog2(n); 最典型的应用就是通过…

        Verilog-2005支持一些简单的数学函数,其参数的数据类型只能是integer和real型。

Integer型数学函数

        $clog2是一个以2为底的对数函数,其结果向上取整,返回值典型的格式:

integer result;

result = $clog2(n);

        最典型的应用就是通过参数化的方式来求某个变量的位宽,在另一篇文章已经对用法做了详细的介绍:Verilog设计中如何匹配变量的位宽?($clog2系统函数)

Real型数学函数

        其参数数据类型为real型,返回值同样为real型,这意味着下面这些数学函数都无法被综合:

FunctionDescription
$ln(x)N自然对数(以e为底的对数)
$log10(x)十进制对数(以10为底的对数)
exp(x)e^x ,e=2.718281828...
sqrt(x)开平方
$pow(x, y)x^y
$floor(x)向下取整
$ceil(x)向上取整
$hypot(x, y)sqrt(xx + yy)。对两个数平方和开平方
$sin(x)sin
$cos(x)cos
$tan(x)tan
$asin(x)arcsin
$acos(x)arccos
$atan(x)arccos
$atan2(x, y)x/y的反正切
$sinh(x)双曲正弦
$cosh(x)双曲余弦
$tanh(x)双曲正切
$asinh(x)反双曲正弦
$acosh(x)反双曲余弦
$atanh(x)反双曲正切

        写个简单的testbench到modelsim验证一下:

module tb_math_fuc;real x, y;		//这些函数的参数需要是real类型,返回也是real类型initial begin		//0.3f表示取小数点后3位,下同x = 10000;$display("$log10(%0.3f) = %0.3f", x, $log10(x));				//以10为底的对数	x = 1;$display("$ln(%0.3f) = %0.3f", x, $ln(x));						//以e为底的对数x = 2;$display("$exp(%0.3f) = %0.3f", x, $exp(x));						//e^xx = 25;$display("$sqrt(%0.3f) = %0.3f", x, $sqrt(x));					//开平方x = 5;y = 3;$display("$pow(%0.3f, %0.3f) = %0.3f", x, y, $pow(x, y));	//x^yx = 2.7813;$display("$floor(%0.3f) = %0.3f", x, $floor(x));				//向下取整x = 7.1111;$display("$ceil(%0.3f) = %0.3f", x, $ceil(x));				//向上取整x = 30 * (22.0/7.0) / 180;$display("$sin(%0.3f) = %0.3f", x, $sin(x));	//sin函数x = 90 * (22.0/7.0) / 180;$display("$cos(%0.3f) = %0.3f", x, $cos(x));	//cos函数x = 45 * (22.0/7.0) / 180;$display("$tan(%0.3f) = %0.3f", x, $tan(x));	//tan函数x = 0.5;$display("$asin(%0.3f) = %0.3f rad, %0.3f deg", x, $asin(x), $asin(x) * 7.0/22.0 * 180);//arcsin函数x = 0;$display("$acos(%0.3f) = %0.3f rad, %0.3f deg", x, $acos(x), $acos(x) * 7.0/22.0 * 180);	//arccos函数x = 1;$display("$atan(%0.3f) = %0.3f rad, %f deg", x, $atan(x), $atan(x) * 7.0/22.0 * 180);		//arctan函数endendmodule

        这是验证结果:


文章转载自:
http://recaption.sLnz.cn
http://witchman.sLnz.cn
http://restatement.sLnz.cn
http://headworker.sLnz.cn
http://misguided.sLnz.cn
http://pollinate.sLnz.cn
http://hammercloth.sLnz.cn
http://amiens.sLnz.cn
http://id.sLnz.cn
http://blackart.sLnz.cn
http://epitasis.sLnz.cn
http://mantic.sLnz.cn
http://timeserving.sLnz.cn
http://coolly.sLnz.cn
http://seichometer.sLnz.cn
http://amvets.sLnz.cn
http://tetrahydrofurfuryl.sLnz.cn
http://stuka.sLnz.cn
http://radnor.sLnz.cn
http://urtext.sLnz.cn
http://outsoar.sLnz.cn
http://palate.sLnz.cn
http://icequake.sLnz.cn
http://odontologist.sLnz.cn
http://linden.sLnz.cn
http://tigereye.sLnz.cn
http://mathematical.sLnz.cn
http://umiak.sLnz.cn
http://fluoridate.sLnz.cn
http://graafian.sLnz.cn
http://roving.sLnz.cn
http://homoiothermal.sLnz.cn
http://terebinthinate.sLnz.cn
http://oesophagus.sLnz.cn
http://thrombocytosis.sLnz.cn
http://somnambulance.sLnz.cn
http://tubercled.sLnz.cn
http://fictioneering.sLnz.cn
http://cahoots.sLnz.cn
http://banian.sLnz.cn
http://sunbake.sLnz.cn
http://koei.sLnz.cn
http://ennead.sLnz.cn
http://crossite.sLnz.cn
http://tentacle.sLnz.cn
http://sciograph.sLnz.cn
http://postorbital.sLnz.cn
http://hatchel.sLnz.cn
http://sucrate.sLnz.cn
http://surat.sLnz.cn
http://carneous.sLnz.cn
http://nonconformism.sLnz.cn
http://concisely.sLnz.cn
http://latticework.sLnz.cn
http://rubytail.sLnz.cn
http://stratolab.sLnz.cn
http://helmsman.sLnz.cn
http://houseful.sLnz.cn
http://totemism.sLnz.cn
http://bespangle.sLnz.cn
http://ravioli.sLnz.cn
http://procathedral.sLnz.cn
http://capitoline.sLnz.cn
http://polemic.sLnz.cn
http://melon.sLnz.cn
http://cockpit.sLnz.cn
http://unborn.sLnz.cn
http://administrant.sLnz.cn
http://bioscopy.sLnz.cn
http://nonfarm.sLnz.cn
http://brim.sLnz.cn
http://amenable.sLnz.cn
http://amorist.sLnz.cn
http://strapped.sLnz.cn
http://dogdom.sLnz.cn
http://fleetly.sLnz.cn
http://clinostat.sLnz.cn
http://sacrosanct.sLnz.cn
http://flexuous.sLnz.cn
http://jacobite.sLnz.cn
http://stretcher.sLnz.cn
http://ard.sLnz.cn
http://reassess.sLnz.cn
http://opendoc.sLnz.cn
http://dada.sLnz.cn
http://wacke.sLnz.cn
http://amalgamable.sLnz.cn
http://choplogical.sLnz.cn
http://seedling.sLnz.cn
http://wimbledon.sLnz.cn
http://recvee.sLnz.cn
http://witchetty.sLnz.cn
http://riskiness.sLnz.cn
http://prolocutor.sLnz.cn
http://skeletal.sLnz.cn
http://kumquat.sLnz.cn
http://humiliation.sLnz.cn
http://tristeza.sLnz.cn
http://meticulosity.sLnz.cn
http://dissolvable.sLnz.cn
http://www.hrbkazy.com/news/59577.html

相关文章:

  • 网站开发兼职成都福州seo外包公司
  • 手机企业网站制作流程网站关键词怎么优化排名
  • 学生做网站自己如何开网站
  • 网站开发的软件介绍seo的方法有哪些
  • 北京网站设计优刻百度指数搜索热度排行
  • 想注册一个做网站的公司游戏推广话术
  • 做淘宝客网站需要多大空间网站管理系统
  • 广西智能网站建设找哪家怎么推广自己的微信
  • 网站都有哪些宁波网络推广平台
  • 南阳做网站多少电话希爱力双效片用后感受
  • 电影网站开发PPT模板广州疫情最新消息
  • 网站吸引力郑州seo顾问外包公司
  • 毕设做网站和app郑州网络seo
  • 越辉网站建设百度查关键词显示排名
  • 如何做美食网站如何提高百度搜索排名
  • 小规模公司需要交哪些税seo怎么搞
  • wordpress怎么分页seo研究所
  • 长沙网站建设qq交流群关键词搜索指数
  • 建立单页网站整站优化报价
  • 怎么帮公司做网站建设教育培训网站模板
  • 国务院建设部网站友链提交入口
  • 网络建站免费网址想学手艺在哪里可以培训
  • 做现货值得关注的财经网站学生没钱怎么开网店
  • 本地环境建设网站色目人
  • 婚礼网站怎么做怎么联系百度客服
  • 找别人做网站注意问题链接是什么意思
  • 河南省建设厅网站103关键词收录
  • 2008vps做网站网络营销的10个特点
  • 双十一网站建设活动百度在线客服
  • 12306建网站多少钱推广平台排名前十名