Giter Club home page Giter Club logo

automatic-verilog's People

Contributors

honkw93 avatar yllinux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

automatic-verilog's Issues

AutoDef should use instantiated parameter width instead of that defined in sub-module

Suppose I have top.sv and fifo.sv

module top
//submodule
/*autodef*/

  fifo #(
  .DW (ALIGN_FIFO_DW)
) u_align_fifo (
  PORT_LIST
)
endmodule
module fifo#
(
  paramter DW
)
(
  [DW - 1:0] data_in
)

Running autodef should make top.sv

module top
//submodule
/*autodef*/
wire [ALIGN_FIFO_DW - 1:0] data_in;  /********This is correct***********/

  fifo #(
  .DW (ALIGN_FIFO_DW)
) u_align_fifo (
  .data_in( data_in[ALIGN_FIFO_DW - 1:0])
)
endmodule

instead of

module top
//submodule
/*autodef*/
wire [DW - 1:0] data_in;        /********This is wrong***********/

  fifo #(
  .DW (ALIGN_FIFO_DW)
) u_align_fifo (
  .data_in( data_in[DW - 1:0])
)
endmodule

AUTOREG wrong bit width

For a register signal declared in the always block, wihich is 4 bits:
image

After AUTOREG, one 12 bits signal is generated:
1

The script seems only take the highest bit to generate register bit width.
Actually we should calculate the range between the highest and lowest bit.

autoparam should not instantiate localparam

In sytemverilog, localparam is allowed to show up in the "parameter area, for example

module fifo#
(
  parameter DP = 8,
  localparam PTRW = $clog2(DP)
)
(
  output [PTRW - 1:0] wptr,
  output [PTRW - 1:0] rptr
)

In this condition, localparam should not appear in the instance

auto inst 对某种写法的支持

经常有这种写法:
module a(
input a
, input b
, input c
, ouput d
);
当模块使用这种写法时,autoinst似乎不能正常的完成,是否能添加这种写法的支持?

Function 'AddCurLineComment' shortcut key in menu is wrong

"Menu&Mapping 菜单栏和快捷键{{{1
amenu &[email protected]\ @(posedge\ or\ posedge)<TAB><<Leader>al>    :call <SID>AlBpp()<CR>
amenu &[email protected]\ @(posedge\ or\ negedge)                     :call <SID>AlBpn()<CR>
amenu &[email protected]\ @(*)                                        :call <SID>AlB()<CR>
amenu &[email protected]\ @(negedge\ or\ negedge)                     :call <SID>AlBnn()<CR>
amenu &[email protected]\ @(posedge)                                  :call <SID>AlBp()<CR>
amenu &[email protected]\ @(negedge)                                  :call <SID>AlBn()<CR>
amenu &Verilog.Code.Header.AddHeader<TAB><<Leader>hd>                           :call <SID>AddHeader()<CR>
amenu &Verilog.Code.Comment.SingleLineComment<TAB><<Leader>//>                  :call <SID>AutoComment()<CR>
amenu &Verilog.Code.Comment.MultiLineComment<TAB>Visual-Mode\ <<Leader>/*>      <Esc>:call <SID>AutoComment2()<CR>
amenu &Verilog.Code.Comment.CurLineAddComment<TAB><Leader>/$>                   :call <SID>AddCurLineComment()<CR>
if !hasmapto('<Leader>hd')
    nnoremap <Leader>hd                                                 :call <SID>AddHeader()<CR>
endif
if !hasmapto('<Leader>al')
    nnoremap <Leader>al                                                 :call <SID>AlBpp()<CR>
endif
if !hasmapto('<Leader>//','n')
    nnoremap <Leader>//                                                 :call <SID>AutoComment()<CR>
endif
if !hasmapto('<Leader>//','v')
    vnoremap <Leader>//                                                 <Esc>:call <SID>AutoComment2()<CR>
endif
if !hasmapto('<Leader>/e')
    nnoremap <Leader>/e                                                 :call <SID>AddCurLineComment()<CR>
endif

AddCurLineComment() is /e not /$

autoinst

在使用自动例化时(重刷or例化)会例化出.NAL (NAL);的端口,这个是什么问题呢,版本1.5

docs-problem

Document problems may be issued here.

文档问题汇总

  1. docsify文档添加英文支持
  2. vim文档添加vim-doc
  3. 其他文档问题可一并提在此issue下

template using problem set

  1. quick always
    easy configuration --> template file

  2. quick if
    if begin end

  3. global setting change
    close g:att_en automatically
    change g:att_en name

filelist嵌套

支持filelist嵌套
filelist.f
内部
-f $ROOT/srt/wrap.f

add /*autoinput*/ /*autooutput*/

Asked by zxj

improved autowire and autoreg
first add sense for right-hand signal
e.g.
a = {b,c[5:0]};
a <= b+c;
must add sense for b and c

systemverilog logic

hi,首先感谢作者的插件。我自己替换了一下autoreg和autowire的关键字,做的类似autologic,还有问题。你可以加上system verilog的logic支持吗? reg和wire不用区分,都用logic代替。

RtlTree failed to recognize instance in some senarios

The regex used in rtl.vim to match module-inst is ";\s*$", so the following code is not recognized.

mod_a u_a (
    ....
    ); // comment

mod_b u_b (
   ....
   );

mod_c u_c (/*autoinst*/
    ...
   // comment;
   ....
   );

The u_b is not recognized due to comment in last line of u_a. And the u_c is not recognized due to the comment with ";" which generated by autoinst function extracting from mod_c.v .

#与(不在同一行时AutoPara异常

需要添加非同一行的parameter获取判断
异常例子如下:
module sync
#
(
parameter WIDTH = 1,
parameter RST_VAL = 0,
parameter DLY_STAGE = 2
)
(
input clk,
input rst_n,
input [WIDTH-1:0] i_din,
output reg [WIDTH-1:0] o_dout
);

autodef pure number width ref err

Asked by gn
e.g.

a u_a1(
. width (width_a[31:0])
);

a u_a2(
. width (width_a[15:0])
);

----->
autodef

wire width_a[15:0]

problem: always choose the last one

auto_template

asked by JJ
refer to veirlog-mode
e.g.
/* InstName AUTO_TEMPLATE <optional “REGEXP”> (
.sig1 (sigx[@]),
.sig2 (sigy[@”(% (+ 1 @) 4)”]),
);
*/

Feature improve

First of all, I would like to express my gratitude for your outstanding work. This tool has made significant progress compared to many years ago, and it has become more and more useful. I have a few small suggestions, and I hope they can be considered.

1. keep instance comment

.power_on   ( power_on ) ; // my comment info

after instance hope

.power_on   ( power_on ) ; //i,  my comment info

Of course, it is also configurable. let g:atv_autoinst_keep_cmnt = 1

2. INST_NEW dd time

.power_on  ( power_on) ;//i, INST_NEW @2023.04.22 15:03

If the time format is configurable, that would be even better.

3. INST_DEL ' .portxxx( to_xxxxx)' keep old connection information .

INST_DEL not only add port name, but keep old port connection , it's usefull for check the source and destination connection
and the comment of INST_DEL should be keep until user delete by themsevels after confirm, and tools never do that , just keep it is ok.

4. fix $ENV issue

i found the let g:atv_autoinst_add_dir_keep = 1 not work .

//verilog-library-flags:("-v $PROJ_HOME/design/rtl/test.v")

get

//Instance: /proj/sharkl/design/rtl/test.v
test utest(
/*autoinst*/
);

i hope:

//Instance: $PROJ_HOME/design/rtl/test.v

5. inteface support .

Do you have any plans to consider support for SV interface

image

image

AutoPara Kill abnormally

asked by Shbli
e.g.
module_name #(/autoinstparam/) inst_name(/autoinst/
...
);

when #( and ) in the same line
autokill abnormally killed all lines

autoinst功能无法使用

Screenshot from 2023-03-29 23-08-16

plugin文件夹拷贝到~/.vimrc/ 后

代码准备好后,点击Autoinst(1) , 现象如下
Screenshot from 2023-03-29 23-15-51

该代码使用 :!emacs --batch tb.v -f verilog-batch-auto 是可以正常例化的

autoinst虽然不能使用,但是header功能是可以使用的,好奇怪

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.