Главная » Просмотр файлов » Donald E. Thomas - The Verilog Hardware Description Language, Fifth Edition

Donald E. Thomas - The Verilog Hardware Description Language, Fifth Edition (798541), страница 5

Файл №798541 Donald E. Thomas - The Verilog Hardware Description Language, Fifth Edition (Donald E. Thomas - The Verilog Hardware Description Language, Fifth Edition) 5 страницаDonald E. Thomas - The Verilog Hardware Description Language, Fifth Edition (798541) страница 52019-09-20СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 5)

However, in Verilog, each module has its own name space; each A in this example is known onlyVerilog — A Tutorial Introduction11within the module in which it is declared. Thus the two A’s are names of distinct entities. In this example though, wire w2 connects them making them electrically thesame. Thus a change made to register A will propagate across wire w2 to the A inputsof g2 and g4.References: synthesis 2.

namespaces 3.6Tutorial: See the Tutorial Problems in Appendix A.2.1.2 Behavioral Modeling of CombinationalCircuitsOur view so far of the Verilog language has mainly highlighted its capabilities ofdescribing structure — module definitions, module instances, and their interconnections. We have only had a very cursory view of the language’s capability for describinga module’s function behaviorally.A behavioral model of a module is an abstraction of how the module works.

Theoutputs of the module are described in relation to its inputs, but no effort is made todescribe how the module is implemented in terms of structural logic gates.Behavioral models are useful early in the design process. At that point, a designer ismore concerned with simulating the system’s intended behavior to understand itsgross performance characteristics with little regard to its final implementation. Later,structural models with accurate detail of the final implementation are substituted andresimulated to demonstrate functional and timing correctness. In terms of the designprocess, the key point is that it is often useful to describe and simulate a module usinga behavioral description before deciding on the module’s actual structural implementation. In this way, the designer can focus on developing the right design (i.e.

one thatworks correctly with the rest of a system and has the intended behavior) before continuing. This behavioral model can then be the starting point for synthesizing severalalternate structural implementations of the behavior.Behavioral models are described in a manner similar to a programming language.As we will see, there are many levels of abstraction at which we may model the behavior of a system.

For large systems, we may describe the algorithm that is to be implemented. Indeed, the algorithm may be an almost direct translation from aprogramming language such as C. At a lower level of abstraction, we may describe theregister-transfer level behavior of a circuit, specifying the clock edges and preconditions for each of the system’s register transfers. At a still lower level, we may describethe behavior of a logic gate or ftip ftop. In each case, we use the behavioral modelingconstructs of the Verilog language to specify the function of a module without directlyspecifying its implementation.The Verilog Hardware Description Language121.2.1 Procedural ModelsExample 1.5 introduces the behavioral approach to modeling combinational logic.The functionality of the module is described in terms of procedural statements ratherthan with gate instantiations.

The always statement, introduced here, is the basis formodeling behavior. The always statement, essentially a “while (TRUE)” statement,includes one or more procedural statements that are repeatedly executed. These procedural statements execute much like you would expect a software program to execute:changing register values using the “=” assignment, and executing loops and conditional expressions. Note that within the always statement, all assignments using “=”are made to entities declared as registers.

This was also true of the initial statementsseen earlier.module binaryToESeg_Behavioral(output reg eSeg,inputA, B, C, D);always @(A, B, C, D) begineSeg = 1;if (~A & D)eSeg = 0;if (~A & B & ~C)eSeg = 0;if (~B & ~C & D)eSeg = 0;endendmoduleExample 1.5 A Behavioral Model of binaryToESegThe example shows a behavioral model of our binary to seven segment displaydriver.

The port declarations are the same as before. We have also declared one register, eSeg. This is the register we will make assignments to within the always statement, and it will also be the output of the purely combinational circuit. This alwaysstatement starts off with an event control “@” statement. The statement:@(A, B, C, D) begin … endstates that the simulator should suspend execution of this always block until a changeoccurs on one of the named entities.

Thus, the value of each of A, B, C, and D is sampled when this statement executes. The simulator then waits for a change to occur onany of these named inputs. When a change occurs on any one (or more) of these, thenexecution will continue with the next statement — in this case what is contained inthe begin … end block.Verilog — A Tutorial Introduction13When a change occurs and execution continues, the assignment and if statementsshown execute much like you would expect in a programming language. In this case,the statements describe how the output (eSeg) is to be calculated from the inputs.Comparing the statements to the Karnaugh map, one can see that the output is set toone.

Then, if one of the zeros of the function is on the input, eSeg is set back to zero.When the begin … end block finishes, the always block restarts again, sampling thelisted values (A, B, C, or D) and then waiting for a change on one or more of them.At this point, the simulator will propagate the final value of eSeg to other parts of thedesign connected to it.There are two features of the example to note. First, it describes the same functional behavior as the previous example, but there is no mention of the actual gatelevel implementation; the model is behavioral.Secondly, the fact that eSeg is declared as a register might make you think that it isnot a combinational circuit.

But, consider the action of this module when only looking at its ports from the outside. You will quickly conclude that if there is any changeon any of the inputs, the output will be re-evaluated based only on the module inputs.The previous value of eSeg does not matter. This is a fundamental characteristic of acombinational circuit. From the outside of the module, it’s clear that this has thebehavior of a combinational circuit.References: always 3.1, if 3.21.2.2 Rules for Synthesizing Combinational CircuitsSynthesis tools read a behavioral description of a circuit and automatically design agate level structural version of the circuit. Thus, given Example 1.5 as an input specification, a synthesis tool might produce the design specified in Example 1.3; otherimplementations are possible too.Not just any sequence of behavioral statements is appropriate for synthesis of combinational circuits.

To use synthesis tools, you need to be very careful with how thedescription is written. The rules for synthesizing combinational circuits are brieflysummarized here but they are covered in far more detail in Chapter 2. To be sure thatyour synthesized circuit will be combinational:Check that all inputs to your combinational function are listed in the controlevent’s sensitivity list (the comma-separated list of names).

That way, if one ofthem changes, the output is re-evaluated. Section 2.3 discusses the use of the @(*)constructto automatically specify all of the inputs.The need for this requirement stems from the definition of a purely combinationalcircuit. The output of a combinational circuit is a function of the current inputs; ifone changes, the output should be re-evaluated.The Verilog Hardware Description Language14Check that there is no way to execute the begin…end loop without assigning avalue to the combinational output (eSeg in this example).

That is, the output mustbe assigned a value at least once in every execution of the begin...end loop. InExample 1.5, line 6 (eSeg = 1;) assigns a value to eSeg and satisfies this requirement.To understand the need for this requirement, consider the situation where youexecute the begin…end loop and don’t assign to the output. In this case, the circuitneeds to remember the previous value. Thus, the output is a function of the current inputs and the previous output.

Характеристики

Тип файла
PDF-файл
Размер
7,95 Mb
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6508
Авторов
на СтудИзбе
302
Средний доход
с одного платного файла
Обучение Подробнее