怎么了?我无法找到错误

时间:2016-02-25 12:33:08

标签: verilog

SELECT 
    sequence 
FROM 
    prices 
WHERE 
    match_description <> '' 
AND 
    LEFT(match_description, 11) = 'SIP Trunk: '
AND
    (RIGHT(match_description, 9) = ' channel)' OR
     RIGHT(match_description, 10) = ' channels)')
AND
    MID(match_description, 12,6) REGEXP '^-?[0-9]+$'
AND
    MID(match_description, 18,3) = ' ( '
AND
    MID(match_description, 20,1) REGEXP '^-?[0-9]+$'
ORDER BY 
    length(match_description) desc 
LIMIT 1;

当我使用synapticad工具调试此代码时,结果是错误。但我无法找到此代码中的内容。

2 个答案:

答案 0 :(得分:0)

EDA Playground看起来很好,因为它输出:

Chronologic VCS simulator copyright 1991-2014
Contains Synopsys proprietary information.
Compiler version J-2014.12-SP1-1; Runtime version J-2014.12-SP1-1;  Feb 25 16:24 2016
                   0: 100
                  10: 196

注意:你的意思是:

repeat(4) begin
  if(b[0]) begin
    prod = prod + {multiplicand, 4'h0};
    b = b + 1;
    prod = prod + 1;
  end
end

或者(因为这是你在代码中所拥有的):

repeat(4) begin
  if(b[0]) begin
    prod = prod + {multiplicand, 4'h0};
  end
  b = b + 1;
  prod = prod + 1;
end

答案 1 :(得分:0)

在分配给opd1的情况下,您没有指定数字的基数,即8'd3