Verilog的新手,并试图找出基于组合逻辑分配电线的基础知识.
我有:
wire val;
wire x;
wire a;
wire b;
always @*
begin
if(val == 00)
I want to assign x = a
if(val == 01)
I want to assign x = b
end
Run Code Online (Sandbox Code Playgroud)
其中a和b是带有值的导线 - 而x是进入寄存器的导线.
如果你能指出我正确的方向,我需要改变,我将不胜感激.
谢谢.
如果浏览器是IE,我可以使用特定的HTML吗?(假设FF是默认浏览器)
Foe示例:
html line 1
if IE
html line 2
else
html line 2
html line 3
html lin3 4
Run Code Online (Sandbox Code Playgroud)
我知道使用不同的CSS,但这不适用于此.
谢谢.
使用VS .NET 2003.想从IDE外部运行.exe(即命令提示符或双击Windows中的.exe图标)但是,仍然希望在IDE中命中断点.
我该如何设置?
(从IDE外部运行,但IDE看到它从"Debug" - >"Start"运行)
谢谢.
当我添加#include <cstdio>
到C程序时,我在cstdio中遇到了大量错误.
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2143: syntax error : missing '{' before ':'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2059: syntax error : ':'
Run Code Online (Sandbox Code Playgroud)
谢谢
编辑 - 我想使用snprintf,这就是我试图包含这个的原因.
我想将我在另一个程序中找到的C函数复制并粘贴到我的C++程序中.
其中一个函数参数使用"this"指针.
void cfunction( FILE *outfilefd, const VARTYPEDEFINED this);
Run Code Online (Sandbox Code Playgroud)
这里的C++编译器错误在函数原型上:
error C2143: syntax error : missing ')' before 'this'
Run Code Online (Sandbox Code Playgroud)
如何使这个C++可用?
谢谢.
编辑(根据Betamoo评论)
void cfunction( FILE *outfilefd, const VARTYPEDEFINED this);
{
UINT8 temp = 0;
temp = (UINT8)( this & 0x000000FF );
if ( ( temp > LIMIT ) )
......
else
{
......
}
}
Run Code Online (Sandbox Code Playgroud) function()
{
FILE *ptr;
ptr = fileopen(file1.txt)
fprint(ptr, some text) //print to file 1
if(second file needed)
{
ptr = fileopen(file2.txt) //open a second file, assign to same file pointer
fprint(ptr, some text) //print to file 2 not working here?
}
}
Run Code Online (Sandbox Code Playgroud)
编辑:
不打印到第二个文件...但是,fprint()不返回负值.
请查看:http://www.cplusplus.com/reference/clibrary/cstdio/sprintf/
对于字符串(%.Ns)精度.
当我在precsion中使用sizeof或#define长度时,它将其作为实际文本读取.
为什么是这样?有什么规则?它只是一个整数值吗?
即 -
buffer[50];
sprintf (buffer, "%.sizeof(buffer)s", string);
Run Code Online (Sandbox Code Playgroud)
要么
#define MAX_LEN
sprintf (buffer, "%.MAX_LENs", string);
Run Code Online (Sandbox Code Playgroud)
谢谢