- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我收到错误
[Synth 8-2576] procedural assignment to a non-register result is not permitted ["lpm_mult.v":29]
我做错了什么?
module lpm_mult (
dataa, datab, // multiplicand,multiplier
sum, // partial sum
clock, // pipeline clock
clken, // clock enable
aclr, // asynch clear
result // product
);
input clock;
input clken;
input aclr;
input [31:0] dataa;
input [31:0] datab;
input [63:0] sum;
output [63:0] result;
always @ (clken or posedge clock) begin
if (1==clken) begin
assign result = dataa * datab;
end
end
endmodule
最佳答案
还有更多问题然后给出错误消息。正如其他人已经指出的那样result
应定义为output <b>reg</b> [63:0] result;
其他问题不会产生编译错误;它们会产生不正确的行为并且无法合成。用代码:
always @ (clken or posedge clock) begin
if (1==clken) begin
assign result = dataa * datab;
end
end
clken
是异步触发;它不应该出现在敏感列表中。安 assign
Always block 内的语句称为过程连续赋值。一旦触发分配,它将持续并立即更新 dataa
的任何更改。或datab
(忽略 clken
和 clock
的条件)。
注意:IEEE 正在考虑弃用过程连续赋值,因此将来它可能会成为非法语法。 IEEE Std 1800-2012 C.4.2程序赋值和取消赋值语句:
The procedural
assign
anddeassign
statements can be a source of design errors and can be an impediment to tool implementation. The proceduralassign
anddeassign
statements do not provide a capability that cannot be done by another method that avoids these problems. Therefore, the proceduralassign
anddeassign
statements are on a deprecation list. In other words, a future revision of IEEE Std 1800 might not require support for these statements. This current standard still requires tools to support the proceduralassign
anddeassign
statements. However, users are strongly encouraged to migrate their code to use one of the alternate methods of procedural or continuous assignments.
常规连续赋值( assign
在程序 block 之外)将保留为合法的合法语法。
Verilog 和 SystemVerilog 已被 IEEE 正式合并为 IEEE Std 1800-2009。
同步逻辑应使用非阻塞 ( <=
) 分配。这是同步逻辑 block 中阻塞 ( =
) 赋值的合法语法,但它不会重新开始。在同步逻辑 block 中使用阻塞分配可能会导致模拟器中的竞争条件,从而导致 RTL 和综合电路之间的行为不匹配。
assign
语句必须使用阻塞赋值(非阻塞是非法语法)。您的代码应如下所示,以便在模拟中正确编译和运行:
...
output reg [63:0] result;
always @ (posedge clock) begin
if (clken==1) begin
result <= dataa * datab;
end
end
关于verilog - 错误 "procedural assignment to a non-register result is not permitted",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31472546/
我试图设置 POSIX 消息队列的大小,但似乎不被允许。 msgctl() 手册页指出: IPC_SET can only be executed by a process with appropri
好的,我在尝试对 MOV 文件进行编码时收到“av_interleaved_write_frame(): Operation not allowed”错误。首先,我需要概述其背后的条件。 我通过在 c
我有一个运行带有选项 allow_other 和 umask 0 的 fuse fs。这给了我一组权限设置为 777 的文件。虽然当我尝试 ls -l 时在包含文件的目录中,我得到以下输出: ls:
我已经安装了 JENKINS 并创建了一个 bob,但是作业因以下错误而失败。我尝试了很多方法,例如授予权限,但都无法使其运行。 谁能告诉我可能是什么原因以及如何让它运行。 13:45:49 Star
我有这行简单的代码: mkdir($path_to_rpi, 0755); chgrp($path_to_rpi, 'sambashare'); 目录创建为 www-data
我是初学者。我尝试使用 git 创建用户名。但是当我打字的时候 git config --global user.name "XXX" 消息显示 Unable to read current work
我的代码如下: calcstep ::Integral a => a -> a calcstep n = calcstep2 n 0 calcstep2 :: Integral (Integral
我们正在gitlab CI中的Alpine Docker镜像中运行vault-cli。 升级后,在调用保管库时会得到以下信息: /bin/bash: line 117: /usr/sbin/vault
在 WinSCP 中,如果您从本地服务器打开了一个文件,并进行更改并按 (Ctrl + S),基本上保存它,您会得到错误提示: /path of the file/ set times: Operat
尽管使用 sudo,pip install 命令有时会生成类似于以下内容的错误: ...Installing collected packages: setuptools, protobuf, whe
我的任务是为系统上的所有用户列出用户所属的所有组。这个想法是通过 /etc/passwd 并为每个用户打印其组。 [编辑] 成功了: if( getgrouplist(passwd->pw_name,
我正在研究 UNIX 网络编程中的示例,并且我已将“daytimeclientcli.c”改编为此处特定于 linux 的代码(这些示例使用 BSD)。我在 here 上针对时间服务器运行了该程序.无
import config from flask import Flask from flask_redis import Redis from werkzeug.contrib.fixers imp
HugeTLB - Large Page Support in the Linux Kernel #include #include #include #include #define MB_
我正在开发一个 Google App Engine Go 应用程序,需要在我的一个包中使用一些 HTML 模板。当前文件结构为: GOPATH/github.com/NAME/PROJECT/
我正在使用 isolate ,一个隔离器,用于隔离另一个使用 Linux 容器的程序的执行。它非常方便,并且在我的本地计算机上运行良好(我可以运行 fork 炸弹和无限循环,它可以保护一切)。 现在我
我正在尝试在用户空间中使用 mmap 来读取“mem_map”开始的物理内存。它是一个包含所有物理页面的数组。这是一台运行 3.0 内核的 i386 机器。 代码是这样的: .... //define
我有问题,我需要通过 php 脚本为系统中的不同用户设置文件所有者权限 所以我通过以下命令执行此操作,其中 1002 是系统的用户 ID。 file_put_contents($filename, $
在拉取一些 docker 镜像(但不是全部)时出现此错误: failed to register layer: Error processing tar file(exit status 1): op
我有一个带有 Rails API 的 React SPA。我最近更改了 React 端的 API 请求以通过 axios 而不是 jquery,我的 axios 设置是: export default
我是一名优秀的程序员,十分优秀!